Java examples for Language Basics:continue
Uses a continue statement to simply skip 12 rather than abort the loop
public class Main { public static void main(String[] args) {//from ww w .ja va 2 s. c o m for (int number = 2; number <=20; number += 2) { if (number == 12) continue; System.out.print(number + " "); } System.out.println(); } }