• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
     
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Likes 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic