If the operation y = "Hello"; is performed, then the result of (x = = y) is

If the operation y = "Hello"; is performed, then the result of (x = = y) is

a)       true
b)       false
c)       x and y becoming aliases
d)       x being set to the value null
e)       a run-time error
Answer:  b.

Explanation:  While x and y now store the same value, they are not the same String, that is, x and y reference different objects in memory, so the result of the condition (x = = y) is false.


Enhancing Classes

Learn More Multiple Choice Question :