- 1

What will be the Output of the java code snippet?

i =0; for (; ;) { for (i = 0; i <= 5; i++); { System.out.println(i); } if (i > 5) break; } a. S b. Infinite loop c. 6 d. 1 2 3 4 5

5th May 2018, 8:27 AM
Santosh Dongare
Santosh Dongare - avatar
2 Answers
+ 3
Try it yourself first. Don't just you use SoloLearn to do your homework.
5th May 2018, 8:49 AM
Aaron Stone
Aaron Stone - avatar
0
none of the answers. the code doesn't compile because you never defined the type of "i". also, i reckon you were trying to submit a quiz? to do that, go into challenges, click the plus, then go to quiz factory and click submit a quiz
5th May 2018, 12:06 PM
hinanawi
hinanawi - avatar