/**
* java 循环结构
*/
public class learn_7 {
public static void main(String[] args) {
//whlie
int a = 10;
while (a < 20) {
System.out.println(a);
a++;
}
System.out.println("\n");
//do while
int b = 10;
do {
System.out.println(b);
b++;
}while (b < 10);
System.out.println("\n");
//for
for (int x = 10; x
关注
打赏
java 循环结构
立即登录/注册


微信扫码登录