-
February 25th, 2004, 11:51 PM
#1
Member
hashCode() algorithm
Does anybody know the algorithm that java uses to get the hashCode for the built in hash table...or can any body give me the source code for that method. It is for a java assignment and i cant figure out that pattern by looking at the numbers, and i couldnt find the actual code in the API
any help would be great, THANKS
-
February 26th, 2004, 02:02 AM
#2
Stupid question, because I am only about 6 weeks into java....
If you know the library it is in ( java.lang.Object ) then why not snoop around a little in the classes and figure it out? That's what I have been doing, and how I found examples of parameter passing in instantiable classes....
and i couldnt find the actual code in the API
Wouldn't that be because that just gives you the syntax necessary to make the call?
Just my input....I've got my own java homework to figure out.
-
February 26th, 2004, 05:39 AM
#3
Member
i know how to use the method, i know how to call the method...but i need the actual algorithm of the method. the method takes a string, and spits back out a int. how does it get from point a to point b... i need that 'formula' and i was searching all the documentation for the actaul source code...i mis typed it and said the API
Thanks for the help tho
-
March 9th, 2004, 02:05 AM
#4
Banned
Well it would help if you gave us the numbers so we could work with them.
A simple google search found this website
http://mindprod.com/jgloss/hashtable.html
that might help.
Is it a homemade algorithm or is it a known one?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|