int i = 0; while (i < 5) { System.out.println("i is now " + i); i++; } // Output: // i is now 0 // i is now 1 // i is now 2 // i is now 3 // i is now 4
Click Run to execute this code.