1 package test; 2 3 public class Test { 4 public static void main(String[] args) { 5 System.out.println("当前记录为 "); 6 for (int i = 0; i < 10; i++) { 7 System.out.print(i + " "); 8 if (i % 2 == 0) { 9 continue; //注意continue的用法 继续循环不退出 10 } 11 System.out.println(); 12 13 } 14 } 15 }