Java - Output numbers using do while loop

Description

Output numbers using do while loop

Demo

import java.util.Scanner;

public class AllNumDo {

     public static void main(String[] args) {
          Scanner input = new Scanner(System.in);

          System.out.print("Please enter the max number:");

          int max = input.nextInt();
          int i = 0;
          do {/*ww w  .  j  av  a 2s. com*/
               System.out.println("Number " + i);
               i++;
          } while ( i <= max);
     }
}