<<< Labeled break example | Index | Labeled continue statement >>> |
The syntax of the continue statement is:
continue;
A continue statement jumps to the beginning of the loop:
for (int j = 1; j < 10; j++) { int number = (int) (Math.random() * 10); System.out.println(number); if (number <= 7) continue; System.out.println("This number is greater than 7"); }
<<< Labeled break example | Index | Labeled continue statement >>> |