PoeticalJustice

导航

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 }

 

posted on 2017-09-28 21:41  PoeticalJustice  阅读(215)  评论(0编辑  收藏  举报