File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

which code is hashcode

 
saikrishna cinux
Ranch Hand
Posts: 689
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


hi, here i am displaying a hashcode in three ways but which is the actual hashcode here
please sombody tell me the actual hashcode...
thanks in advance
 
ak pillai
author
Ranch Hand
Posts: 288
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the above call the default hashCode method in your Object class. If you need to provide your own hashCode method then it should be an instance method with no argument as shown below:





If you override the hashCode() method remember to override equals() method as well. If 2 objects are equal, then they should produce the same hashcode but the reverse is not true.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic