集册 Java实例教程 在重复陈述时做...。

在重复陈述时做...。

欢马劈雪     最近更新时间:2020-01-02 10:19:05

459
提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
在重复陈述时做...。
/** from nowjava.com - 时  代  Java**/

public class Main 

{  

   public static void main(String[] args)

   {

      int counter = 1; 


      do 

      {

         System.out.printf("%d  ", counter);

         ++counter;

      } while (counter <= 10); // end do...while 


      System.out.println(); 

   } 

}