aspose file tools*
The moose likes Servlets and the fly likes hashcode() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "hashcode()" Watch "hashcode()" New topic
Author

hashcode()

Naveen R R
Greenhorn

Joined: May 04, 2001
Posts: 20
Hi,
Could someone provide me with an example of hashcode()? I need to get the hashcode for each attribute, sum them and rehash them.
And, how does the equals() fit in here?
Thanks,
Naveen
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
Every Java class has a hashCode() method - just call it for the String containing your attribute. Look at the source code for java.lang.String for an example.
Bill

------------------
author of:


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hashcode()
 
Similar Threads
equlas() and hashCode()
java.lang.object
need help with the space-time continium
What is hashCode?
Hashcode for HashMap not dependent on the hashcode of key added?