aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Question 51 in John Meyer's mock Exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Question 51 in John Meyer Watch "Question 51 in John Meyer New topic
Author

Question 51 in John Meyer's mock Exam

Denis Bogdanov
Greenhorn

Joined: Jul 10, 2008
Posts: 8
At the first i would like to say "Thank you for the Exam."

Now i have a note to question 51:
I think that answer "If Line 1 is replaced with return true; then size() will
not return any number greater than 1." is not correct.

I can add an object of another class to the map and this class can(must) have his own methods equals/hashCode.

Sid Murrey
Ranch Hand

Joined: Jul 07, 2008
Posts: 58
I just compiled your code and, indeed, the output was '2'.
You should notify the maintainer of the mock exam about this.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Originally posted by Denis Bogdanov:
At the first i would like to say "Thank you for the Exam."

Now i have a note to question 51:
I think that answer "If Line 1 is replaced with return true; then size() will
not return any number greater than 1." is not correct.

I can add an object of another class to the map and this class can(must) have his own methods equals/hashCode.




Firstly thank you for trying out the exam and I hope it helps you with your certification.

What the answer is trying to say is that if line 1 alone were changed and no other object type other than 'test' is added then the size would never be greater than one. It appears that my answer (or rather the option) was not elaborate enough. Thank you for your feedback.

Right now I am quite busy with work and other projects apart from work. I ll fix this when time allows. I ll put it on my to do list. Thanks for letting me know about the error in explanation and option.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question 51 in John Meyer's mock Exam