aspose file tools
The moose likes Servlets and the fly likes hashcode() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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: 12269
    
    1
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
need help with the space-time continium
equlas() and hashCode()
Hashcode for HashMap not dependent on the hashcode of key added?
What is hashCode?
java.lang.object