The continue statement stops the execution of the current iteration and causes control to begin with the next iteration.
For example, the following code prints the number 0 to 9, except 5.
public class MainClass { public static void main(String[] args) { for (int i = 0; i < 10; i++) { if (i == 5) { continue; } System.out.println(i); } } }