+ 1
Is the for loop like while loop in the result
2 odpowiedzi
+ 13
Depends on the conditions you test...
Example
for (int i; i <=2; i++)
System.out.println (i);
results the same as
int i = 0;
while (i <=2) {
System.out.println (i);
i++;
}
+ 1
Never
That's why they both exist