• Post Reply Bookmark Topic Watch Topic
  • New Topic

hashCode() overridding  RSS feed

 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not clear about overridding rules of hashCode () with equals()

1.Is is constraint if we override one method,we have to override another.
or for performance purpose.AS i tried ,it doest give any error.
2.we get Questions to select best overriding method.How do we decide that.
Is it like ,hashCode() should be minimally dependant on objects variables.

thnx
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
De following link may help you:

Equals and HashCode in Java
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!