com.xu.struct.DoWhileDemo02

package com.xu.struct;

public class DoWhileDemo02 {
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);
}
}

//结果是前者什么也没有输出,后者是0

"D:\Program Files\Java\jdk1.8.0_281\bin\java.exe" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2021.1\lib\idea_rt.jar=63066:D:\Program Files\JetBrains\IntelliJ 
====================
0

Process finished with exit code 0

上一篇:异常-银行账户异常处理


下一篇:[SUCTF 2018]MultiSQL