This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Q on hashcode()" Watch "Q on hashcode()" New topic

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.


Kapil Munjal
SCJP 1.4, SCWCD 1.4
I agree. Here's the link:
subject: Q on hashcode()
Similar Threads
what is hashcode and equals contract?
hash code
Practice Question
need help with the space-time continium