It's not a secret anymore!*
The moose likes Java in General and the fly likes Object.hashCode() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Object.hashCode()" Watch "Object.hashCode()" New topic


Pavel Kubal
Ranch Hand

Joined: Mar 13, 2004
Posts: 356
Why this

runned multiple prints allways this

[ June 13, 2006: Message edited by: Pavel Kubal ]
vishwanath nadimpally
Ranch Hand

Joined: Jan 25, 2005
Posts: 116
Whats the question? obj1.hashCode() will always be different from obj.hashCode() as they are 2 different objects
It is sorta covered in the JavaRanch Style Guide.
subject: Object.hashCode()
Similar Threads
HashMap prob
hashCode() problem
Equals e HashCode
question concering hashCode(), equals() and operator ==
static - final - obj ref