package com.myweb.test;
public class TestDoWhile {
public static void main(String[] args) {
int a = 0;
int b = 0;
int c = 0;
do{
c--;
a = a-1;
}while(a>0);
System.out.println("c:"+c);
while(a>0){
b--;
}
System.out.println("b:"+b);
}
public class TestDoWhile {
public static void main(String[] args) {
int a = 0;
int b = 0;
int c = 0;
do{
c--;
a = a-1;
}while(a>0);
System.out.println("c:"+c);
while(a>0){
b--;
}
System.out.println("b:"+b);
}
}
do while 代码块至少会执行一次