What will be the output of the program?


			  		

Loading

Choose the correct option.

What will be the output of the program?

int x = 3;  
int y = 1;
if (x = y) /* Line 3 */ {
System.out.println("x =" + x);
}

 

A. x=1
B. x=3
C. Compilation fails.
D. The code runs with no output.