/* Author: James Tam Version: January 20, 2016 */ public class DoWhileDriver { public static void main(String [] args) { int i = -1; // Simple counting loop version i = 1; do { System.out.print(i + " "); i++; } while (i <= 4); System.out.println(); // Guaranteed execution atleast once (post-test) i = 10; do { System.out.print(i + " "); i++; } while (i <= 4); System.out.println(); } }