Counter Do While in java

import java.util.Scanner;
public class CounterDoWhile {
	public static void main (String arg[]){
		Scanner xScanner=new Scanner(System.in);
		int number,i=0;
		System.out.print("Please enter a number: ");
		number=xScanner.nextInt();
		do
		{
			System.out.print(i+++" ");
		}
		while(i!=number+1);
		xScanner.close();
	}

}