package test;

public class ScannerDemo004 {
public static void main(String[] args) {
//从循环体跳到标识符处,不会再进入循环体,会执行该循环体后面的语句
outer:
//System.out.println("111"); //outer标识符和循环语句之间不能有任何语句
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
if(i==j){
//中断循环后会跳出到标识符outer:处
break outer;
}
System.out.println("1111"+i);

}
}
System.out.println("@@@@@@@@@@@@@");
}
}

相关文章:

  • 2022-12-23
  • 2022-01-18
  • 2022-02-10
  • 2021-10-20
  • 2021-12-10
  • 2022-01-08
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2021-12-02
  • 2021-12-10
  • 2022-02-22
  • 2022-02-15
  • 2021-12-09
  • 2021-08-14
  • 2021-08-10
相关资源
相似解决方案