• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Possible errata in Java OCA 8 Programmer I Study Guide (Sybex)

 
francisco de feudis
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi for all, nice to see you.
This is my first post, I'm writing to check with you if there are this two possible error in the book I'm studying:

-----------------------------------------------------------------------------------------------------------------------------

Chapter 6 - Review Question n. 18 on page 331 says:

18. Which of the following are true? (Choose all that apply):

  • A. Checked exceptions are allowed to be handled or declared.
  • B. Checked exceptions are required to be handled or declared.
  • C. Errors are allowed to be handled or declared.
  • D. Errors are required to be handled or declared.
  • E. Runtime exceptions are allowed to be handled or declared.
  • F. Runtime exceptions are required to be handled or declared.



  • The answer is:

    A, B, C, E. Checked exceptions are required to be handled or declared. Runtime
    exceptions are allowed to be handled or declared. Errors are allowed to be handled or
    declared, but this is bad practice.


    Shouldn't it be B, C, E? Are not A and B mutually exclusive ?

    -----------------------------------------------------------------------------------------------------------------------------

    Chapter 5 - Review Question n. 15 at page 295 says:

    C. A concrete subclass must implement all methods defined in an inherited interface.


    Is the interface inherited? Isn't it implemented?
    The sentence shouldn't be: A concrete subclass must implement all methods defined in an inherited interface.

    In the Answer I see:


    Option C
    is incorrect; a superclass may have already implemented an inherited interface, so the
    concrete subclass would not need to implement the method.


    Here again it is talking about inherited interface. Is it correct ?

    Thank you very much
     
    Roel De Nijs
    Sheriff
    Posts: 10662
    144
    AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi francisco de feudis,

    First of all, a warm welcome to CodeRanch!

    francisco de feudis wrote:Shouldn't it be B, C, E? Are not A and B mutually exclusive ?

    That seems to be an English thing. So it is not a typo. We had a fairly lengthy discussion on the topic though. Here is another topic about this question (with exactly the same conclusion).

    francisco de feudis wrote:Is the interface inherited? Isn't it implemented?

    When a concrete class implements an interface, the concrete class must implement all methods from the interface. But in this question it is about superclasses and subclasses. When a subclass doesn't implement any interface, but the superclass implements an interface, the subclass indirectly implements this interface through inheritance. So this interface could be considered as an inherited interface (from the subclass' point of view), thus it is not an errata item.

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