All Courses
Continue Statement in Java

Continue Statement in Java

May 2nd, 2019 Java

Java Continue Statement

The continue statement break one iteration, If a specified condition occurs ,and continues with the next iteration in the loop.

Example:

public class Demo {
public static void main(String[] args) {
boolean res = false;
for (int i = 0; i < 10; i++) {
if (i%2==0) {
continue;
}
}
}
}
Output:
1

3

5

7

9

Social Share:

0 responses on "Continue Statement in Java"

Leave a Message

Your email address will not be published. Required fields are marked *