0
Is it an infinite loop ?
for (int i=1; i<=10;) { System.out.print(i); }
3 Antworten
+ 3
Yes. The variable 'i' is not being changed in this loop, so the condition will evaluate to true every single time.
0
yeah but the increment is not there
0
Exactly. It doesn't need to be there.