This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes what is hashcode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what is hashcode" Watch "what is hashcode" New topic
Author

what is hashcode

sankar kandasamy
Greenhorn

Joined: Sep 13, 2007
Posts: 13
I dont know, how the hashcode is calculated for the object?
Can any one help me for this
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14279
    
  21

What exactly do you want to know; how the hashCode() method in class Object calculates hashcodes? You can find the answer to that question in the API documentation of class Object.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Howdy ranchers,

you cannot tell exactly how the hashCode is calculated. It is a native method so it is performed by the JVM and may be different on every System.

Yours,
Bu.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: what is hashcode