A continue statement can only be used inside the for-loop, while-loop, and do-while statements.
There are two forms of the continue Statements:
An example of an unlabeled continue statement is
continue;
An example of a labeled continue statement is
continue label;
A continue statement skips the current loop iteration.
public class Main { public static void main(String[] args) { for (int i = 1; i < 10; i++) { if (i % 2 == 0) { continue; }// w w w. jav a2 s . com System.out.println(i); } } }