Solved

You Intend to Use a Hash Set with Your Own

Question 15

Multiple Choice

You intend to use a hash set with your own object class. Which of the following statements is NOT correct?


A) You do not have to do anything additional. You can use the hashCode function of the Object class.
B) You can create your own function to compute a hashCode value.
C) You can override the hashCode method in the Object class to provide your own hashCode method.
D) Your class's hashCode method does not need to be compatible with its equals method.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions