Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question 51 in John Meyer's mock Exam

 
Denis Bogdanov
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic