File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes HashCode and Equals Contract Question from Master Exam Learner Key Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "HashCode and Equals Contract Question from Master Exam Learner Key" Watch "HashCode and Equals Contract Question from Master Exam Learner Key" New topic
Author

HashCode and Equals Contract Question from Master Exam Learner Key

Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

This question is from Master exam.


if the output is "x = 1111". Which of the following statements will always be true?



And correct answer given is



But as per my under standing answer should be


Please provide your feedback


Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9090

This question has popped up before here, and IMHO, you are right...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
 
subject: HashCode and Equals Contract Question from Master Exam Learner Key
 
Threads others viewed
Can't Understand... K&B Mock Exam
Master Exma question
master exam doubt
Question from Mock exam
equal() and hashcode()..
IntelliJ Java IDE