0
In the loop why did it skip 30 because of the continue statement?
here is the code public class Program { public static void main(String[] args) { int x = 1; while(x > 0) { System.out.println(x); if(x == 4) { break; } x++; } } }
2 Antworten
+ 2
Could you please include the code you're questioning about?
+ 2
The code you've included has no "continue" statement, only a break statement. The code you've added to the question should print x, until the if statement occurs, breaking you out of the loop.