📚 Practice Mode
Java Practice Test - 10
Learn at your own pace with hints and detailed explanations
1 / 25
Multiple Choice
Which two statements are true about properly overridden hashCode() and equals() methods?
- hashCode() doesn't have to be overridden if equals() is.
- equals() doesn't have to be overridden if hashCode() is.
- hashCode() can always return the same value, regardless of the object that invoked it.
- equals() can be true even if it's comparing different objects.
- 1 and 2
- 2 and 3
- 3 and 4
- 1 and 3