Java – continue statement1 min read

It is one of the jump statement in java. It is used in loops to jump immediately to the next iteration of the loop. continue is used with while loop or do/while loop and with for loop.

When continue is used inside for loop then the control immediately jumps to the increment or decrement part of the for a loop. And when used inside while loop or do/while loop then the control immediately jumps to the condition part.

Continue statement in java

Syntax of continue:


Example: Java program to demonstrate the continue statement:

Output:


Break statement.