class Main { public static void main(String args[]){ int i=1; while(i<10){ System.out.println(i); i++; } } }
output:
1 2 3 4 5 6 7 8 9