Java examples for Language Basics:do while
Do...while repetition statement.
public class Main { // ww w . ja v a 2 s . com 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(); } }