Solved

You Intend to Use a Hash Set with Your Own

Question 86

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents