Java Continue Statement
Java Continue Statement
Syntax:pts in Java
1. jump-statement;
2. continue;
Output:
1
2
3
4
6
7
8
9
10
Java Continue Statement with Inner Loop
It continues inner loop only if you use the continue statement inside the inner loop.
ContinueExample2.java
Output:
1 1
1 2
1 3
2 1
2 3
3 1
3 2
3 3
Java Continue Statement in while loop
ContinueWhileExample.java
Output:
1
2
3
4
6
7
8
9
10
Java Continue Statement in do-while Loop
ContinueDoWhileExample.java
Output:
1
2
3
4
6
7
8
9
10