Continue (Java)
Appearance
The continue keyword works in Java in the same way that it does in C and C++. It operates inside of while and for loops where when it is called, will skip the remaining instructions in the loop and begin on the next iteration in the loop.
//The following only prints even numbers for(int i=0; i<10; i++) {
//skips the print statement if i is not even if(i % 2 != 0) continue;
System.out.println(i);
}