// this will print 1 to 10. int ctr = 1; while(ctr <= 10) { System.out.println(ctr); // print ctr value ctr++; // increment ctr value by 1 }