Mastering Java 2026 – 400 Free Practice Questions to Pass the 'Thinking in Java' Exam

Question: 1 / 510

For object reference comparison, which operators are used?

== and !=

Certain operators like the == and != do not compare the contents of objects, but rather the memory reference/address. This means these operators simply check if the objects being compared are the same object, not if they have the same content. The equals() and !equals() methods are used for content comparison, but these are not operators. The hashCode() and !hashCode() methods simply return unique hash codes for objects, they do not compare objects. The === operator is not a valid Java operator. Therefore, the correct answer is A as it correctly identifies the operators used for object reference comparison.

Get further explanation with Examzify DeepDiveBeta

equals() and !equals()

hashCode() and !hashCode()

== and ===

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy