What does `==` compare for two Java object references?
Answer & explanation
Answer: Whether both references point to the same object
For objects, `==` compares reference identity. Use an appropriate `equals` implementation for value equality.
Practice types & equality with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
Answer: Whether both references point to the same object
For objects, `==` compares reference identity. Use an appropriate `equals` implementation for value equality.