其他分享
首页 > 其他分享> > com.xu.struct.BreakDemo01

com.xu.struct.BreakDemo01

作者:互联网

package com.xu.struct;

public class BreakDemo01 {
public static void main(String[] args) {
int i=0;
while(i<100){
i++;
System.out.println(i);
if(i==30){
break;//只是跳出这个循环,不影响下面123的输出
}
}
System.out.println("123");//123
}

}

"D:\Program Files\Java\jdk1.8.0_281\bin\java.exe" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2021.1\lib\idea_rt.jar=62858:D:\Program Files\JetBrains\IntelliJ 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
123

Process finished with exit code 0

标签:Files,struct,System,123,BreakDemo01,Program,out,com,xu
来源: https://www.cnblogs.com/xunzhao26/p/14807044.html