February 25th, 2004, 10:51 PM
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, 01:02 AM
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....
Wouldn't that be because that just gives you the syntax necessary to make the call?
and i couldnt find the actual code in the API
Just my input....I've got my own java homework to figure out.
February 26th, 2004, 04:39 AM
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, 01:05 AM
Well it would help if you gave us the numbers so we could work with them.
A simple google search found this website
that might help.
Is it a homemade algorithm or is it a known one?