What is the output after compile and run the following code ? int Output = 10; boolean b = false; if((b == true) && ((Output += 10) == 20)) { System.out.println(“We are equal ” + Output); } else { System.out.println(“Not equal! ” + Output); }

A) Compilation and output of “We are equal 10”

B) Compilation and output of “Not equal! 10”

C) Compilation error, attempting to perform binary comparison on logical data type

D) Compilation and output of “Not equal! 20”

View Answer
Option – B.

More Questions

error: Content is protected !!