Java Practice Test - 10

Time: 00:00:00
0
Attempted
25
Not Attempted
0
Marked For Review
0
Attempted & Reviewed

Question 1 of 25

Which two statements are true about properly overridden hashCode() and equals() methods?

  1. hashCode() doesn't have to be overridden if equals() is.
  2. equals() doesn't have to be overridden if hashCode() is.
  3. hashCode() can always return the same value, regardless of the object that invoked it.
  4. equals() can be true even if it's comparing different objects.
Select Your Answer:

All Questions

Attempted
Not Attempted
Marked for Review
Attempted & Reviewed
Current