Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Possible errata Chapter 4 Review Questions (Java OCA 8 Programmer I Study Guide, Sybex)

 
Aleksandra Pestova
Ranch Hand
Posts: 36
2
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While going through review quetions I found two possible mistakes:

1. Question 19 (page 226):
Which of these classes compile and use a default constructor? (Choose all that apply)
...
G. public class Bird { void Bird() { }


I guess "}" is missing. The answer should be:  public class Bird { void Bird() { } } .


2. Question 22 (page 227):
What is the result of the following?


Answers:



Import is missing.
Since both code snippets start with the line number 1, class OrderDrive doesn't know anything about class Order .
E is mentioned as the correct answer, but due to the missing import the correct answer should be G.
 
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
Aleksandra Pestova wrote:1. Question 19 (page 226):

You are correct! This errata item was reported a year ago and is already added to the official errata overview.

Aleksandra Pestova wrote:2. Question 22 (page 227):

You are incorrect! The correct answer in the book is spot-on! The code will print "u u ucrcr" on execution. For more information please read this topic where another rancher made exactly the same comment

Hope it helps!
Kind regards,
Roel
 
Aleksandra Pestova
Ranch Hand
Posts: 36
2
Firefox Browser Java Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for providing the link! Haven't paid attention to the default packages. 
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic