class TestBreakContinue { public static void main(String[] args) { for(int i = 1; i <= 10; i++){ if(i % 4 == 0){ //break; continue; } System.out.println(i); } label: for(int i = 1;i < 5;i++){ for(int j = 1; j<=10; j++){ if(j % 4==0){ //break label; continue label; } System.out.print(j); } System.out.println(); } } }
原文地址:http://9815936.blog.51cto.com/9805936/1600755