Get Started
1414

Q: When do you override hashcode and equals() ?

  • उत्तर देखें
  • Workspace

Answer :
Explanation :

HashCode method return int value. So the Hash value is the int value returned by the hash function . If you want to do equality check or want to use your object as key in HashMap, we must override hashcode and equals() method.

सबसे विस्तृत एग्जाम तैयारी प्लेटफार्म

Examsbook Prep ऐप आज ही प्राप्त करें