Read the following program: public class test { public static void main(String [] args) { int x = 3; int y = 1; if (x = y) System.out.println("Not equal"); else System.out.println("Equal"); } } What is the result?

  1. The output is “Equal”

  2. The output in “Not Equal”

  3. An error at " if (x = y)" causes compilation to fall.

  4. The program executes but no output is show on console.


Correct Option: C

Find more quizzes: