Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Altering Object's hashcode ...

 
Brian Lugo
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What causes an Object's hashcode to be altered.
I came across this in ExamPrep book with refrence to Hashtable. The author says:
-- Don't alter an object stored in a Hashtable, if the modification affects the hashcode. If you have to alter an object, remove it from the table, modify it, and then put it back. --
Thanks,
Brian
 
Brian Lugo
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind,
I guess this may be in reference to the classes
that implement their own hashcode method by overriding Object/Parent class hashcode method.
Brian
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic