package com.wuming.struct;
public class BreakDemo01 {
public static void main(String[] args) {
//break终止当前循环,循环后面的可继续输出
int i=0;
while(i<100){
i++;
System.out.println(i);
if (i==30){
break;
}
}
System.out.println("123");
}
}
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