Search Interview Questions | Click here and help us by providing the answer. Click Correct / Improve and please let us know. |
|
|||
|
| ||||
| Interview Questions and Answers | ||||
| ||||
| Ans. For objects or references, == operator check if the reference on left and right points to the same object. For primitive types or variables, == operator check if the variable on left and right holds the same value. | ||||
Integer x = 1; Integer y = 2; System.out.println(x == y); What if you change 1 to "1" and Integer to String? | ||||