作者: | 来源:互联网 | 2024-10-19 15:27
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();
}
}
}
break continue label 学习笔记