public class Test {
public static void main(String[] args){
System.out.println("Hello!");
Lo:for (int i = 0; i <= 3; i++){
for (int j = 0;j <= 3; j++){
if(j == 3)break Lo;//结束Lo标签的循环体
else System.out.println("i="+i+" j="+j);
}
}
}
}
public class Test {
public static void main(String[] args){
System.out.println("Hello!");
Lo:for (int i = 0; i <= 3; i++){
for (int j = 0;j <= 3; j++){
if(j == 2)continue Lo;//结束Lo标签的循环体这一轮循环,开始下一轮Lo标签下的循环
else System.out.println("i="+i+" j="+j);
}
}
}
}
标签:String,int,标签,void,args,Hello,public
From: https://www.cnblogs.com/TFOREVERY/p/17118373.html