hashCode override | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

hashCode override

When we override this method and what we check in implementation ?

25th Mar 2017, 9:06 PM
Gheorghe Cătălin Crişan
Gheorghe Cătălin Crişan - avatar
1 Answer
+ 12
You override equals and hashCode. Then you can check for equality to whatever you defined in your equals method.
26th Mar 2017, 3:10 PM
Tashi N
Tashi N - avatar