Which two statements are true about comparing two instances of the same class, given that the equals() and hashCode() methods have been properly overridden?
- If the equals() method returns true, the hashCode() comparison == must return true.
- If the equals() method returns false, the hashCode() comparison != must return true.
- If the hashCode() comparison == returns true, the equals() method must return true.
- If the hashCode() comparison == returns true, the equals() method might return true.
|