public class Test {
public static void main(String[] args) {
outfor:for(int i = 0; i < 10;i++){
for(int j = 0; j < 10;j++){
if(j == 5){
break outfor;
}
System.out.println("j = "+j);
}
}
}
}
public class Test {
public static void main(String[] args) {
int i = 0;
outwhile:while(i < 10){
int j = 0;
while(j < 10){
if(j == 5){
break outwhile;
}
System.out.println("j = "+j);
j++;
}
i++;
}
}
}
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/qq_44757034/article/details/121030811
内容来源于网络,如有侵权,请联系作者删除!