dowhile

 1 public class TestDoWhile {
 2 
 3     /**do while 至少执行一次 先斩后奏 
 4      *   测试dowhile
 5      */
 6     public static void main(String[] args) {
 7         int a=0;
 8         while(a<0){
 9             System.out.println("ok");
10             a++;
11         }
12         do{
13             System.out.println(a);
14         }while(a<0);
15     }
16 
17 }
原文地址:https://www.cnblogs.com/PoeticalJustice/p/7608747.html