File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "what is hashcode" Watch "what is hashcode" New topic

what is hashcode

sankar kandasamy

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: 15092

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.

I agree. Here's the link:
subject: what is hashcode
It's not a secret anymore!