What will be the output of the program?


			  		

Loading

Choose the correct option.

What will be the output of the program?

class Test {     
public static void main(String [] args) {
int i = 0;
while(1) {
if(i == 4) {
break;
}
++i;
}
System.out.println("i = " + i);
}
}

 

A. i = 0
B. i = 3
C. i = 4
D. Compilation fails.