The result of (x = = y) is

The result of (x = = y) is

a)       true
b)       false
c)       a syntax error
d)       a run-time error
e)       x being set to the value null

Answer:  b.

Explanation:  x is a String instantiated to the value "Hello" and y is a String that has not yet been instantiated, so they are not the same String.  (x = = y) is a condition, testing to see if x and y are the same String (that is, x and y reference the same item in memory), which they don't, so the result is false.


Enhancing Classes

Learn More Multiple Choice Question :