Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: hashcode()
|
Posted: Aug 31, 2005 10:55 PM
|
|
It doesn't take any parameters.
How the hashcode is computed it dependent on the JVM, probably, but I would guess some JVMs just return the int value of the underlying pointer to the object.
Read this: http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()
If what you are really asking is how to compute the hashcode for a class of your own, you should get a copy of the book Effective Java.
|
|