做作业时看到的 Demo
1 public class HelloWorld { 2 public static void main(String[] args) { 3 outer: 4 for(int i = 0;i < 3; i++, System.out.println("\t OUTER "+i)) 5 inner: 6 for (int j=0; j<2; j++, System.out.println("\t INNER " + j)){ 7 if (j == 1) { 8 System.out.println("\t go1"); 9 continue outer; 10 } 11 System.out.println(j+" and " + i + ";"); 12 } 13 14 15 System.out.println("---------------EOF----------------"); 16 } 17 }
运行结果
附上:
--------蓝天上的云_转载请注明出处.