/*
示例
*/classdemo3{publicstaticvoid main (String[]args){int i =1;while(i <=100){if(i <=50){
System.out.println("循环退出");break;}i++;}}}
1.3 continue
continue 关键字:
结束当前循环,进入下一次循环
/*
示例
*/classdemo4{publicstaticvoid main (String[]args){for(int i =1; i <=10;i++){
System.out.println(i);if(5== i){
System.out.println("你来打我呀");continue;}}}}//这是与for循环示例,continue会运行,但是不会影响到for循环运行