wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Q on hashcode() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Q on hashcode()" Watch "Q on hashcode()" New topic
Author

Q on hashcode()

Anand Ko
Ranch Hand

Joined: Dec 03, 2003
Posts: 79
i am preparing for scjp.
What type of questions on hashcode() will be ?


Anand<br />SCJP 1.4, SCWCD 1.4, SCEA 5.0(1/3)
kapil munjal
Ranch Hand

Joined: May 11, 2004
Posts: 298
Well, you will find questions if equals method returns true then hashcode method will return the same value. Or may be the reverse, if hashcode method returns the same value then equals method should return true.

Mainly hashcode questions are related to equals method implementation.

Kaps


Kapil Munjal
SCJP 1.4, SCWCD 1.4
 
jQuery in Action, 2nd edition
 
subject: Q on hashcode()