Step by step learning
What will be the output of the program?
class Example { public static void main(String[] args) { int i = 0; while (1) { if (i == 4) { break; } ++i; } System.out.println("i = " + i); } }
Compilation fails.
i = 4
i = 3
i = 0
Please log in or register to have a possibility to add comment.
Please log in or register to have a possibility to add comment.