Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt about Self Test Chapter 1, Question 9 (CH1Q9, K&B7)

 
Mark Kevin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello:

Since the code in Question 9 of the Self Test on page 79 is missing the first curly brace, which would also result in
a compilation error, isn't the correct answer B, "Compilation fails due to multiple errors" in addition
to the original correct answer D, (method cannot be invoked from a static context)? I spotted both and
said the answer was B due to multiple errors.

Mark

The following is the errata.

######################################

page 79: Self Test, Question 9

In the code snippet the opening curly brace of class Frodo is missing.

Currently:

4. public class Frodo extends Hobbit

Should be:

4. public class Frodo extends Hobbit {

#####################################
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Kevin wrote:isn't the correct answer B, "Compilation fails due to multiple errors" in addition to the original correct answer D, (method cannot be invoked from a static context)?

No. The missing curly brace is an errata item, meaning it was not intended to be missing in the question. I was a technical reviewer for this study guide, so in my notes the curly brace is not missing. So something went wrong in the "Transforming to self-test question" process.

Mark Kevin wrote:I spotted both and said the answer was B due to multiple errors.

If you spotted both errors (the missing curly braces and method countGold being invoked from a static context) and answered B, give yourself full marks for this question! If you answered B for other errors, you should give yourself 0 points for this question.

Hope it helps!
Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic