+ 5
what is the meaning of following loop?
for (; ;) { System.out.println("This is printed"); }
3 Respuestas
+ 5
Infinite loop
1) initialization
2) condition checking
3) increment/decrement are optional in for loop.
so if you do not provide the condition checking in the for loop then the condition is always true.
for(;;)
the for loop will run infinitely.
system.out.println(" This is printed");
will get executed repeatedly
+ 2
I get it, thankyou
0
yes it is Infinite loop because the loop has no counter , nor text and nor counter updating