• Post Reply Bookmark Topic Watch Topic
  • New Topic

How equals and hashcode work together (hashing algorithm , hash buckets)  RSS feed

 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I know the contract terms between hashcode and equals

but

I got this interview question

"How equals and hashcode work together" ? why do we need overwrite hashcode?

When does hashing algorithm , hash buckets will come into picture.


I really appreciate , Many thanks
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!