If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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

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?

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

Well it would help if you gave us the numbers so we could work with them.
A simple google search found this websitehttp://mindprod.com/jgloss/hashtable.html
that might help.
Is it a homemade algorithm or is it a known one?