I did not understand equals, hash code methods how they are coded. Anyone can explain | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I did not understand equals, hash code methods how they are coded. Anyone can explain

to equal two different objects

6th Mar 2017, 7:59 AM
Nagaraju Kandula
Nagaraju Kandula - avatar
2 Answers
+ 1
you can simply always return true in equals and same hashcode for all objects
6th Mar 2017, 7:29 PM
Konstantin Eremin
Konstantin  Eremin - avatar
0
Thank you Konstantin Eramin garu
8th Mar 2017, 6:43 AM
Nagaraju Kandula
Nagaraju Kandula - avatar