package com.Java.LSC.shiyan.JavaXunHuan;
public class CasonDoWhile02 {
public static void main(String[] args) {
int a = 0;
while (a<0){
System.out.println(a);
a++;
}
System.out.println("===========================");
do {
System.out.println(a);
a++;
}while (a<0);
}
}
/*
由于whlie循环已经判断了a=0,且a不小于0,因此无法进入while循环,并无法输出;
而do...while循环就不一样,至少a在do{}里循环了一次;
这就是while循环和do...while循环的区别
*/
标签:do,CasonDoWhile02,...,System,while,循环,out From: https://www.cnblogs.com/LSCS/p/16923777.html