• 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

Error on chapter 6 mock explanation - question No. 18 (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
The answer for question No.18 claims the correct answer as A;B;C;D

A -> Checked exceptions are allowed to be handled or declared
B -> Checked exceptions are required to be handled or declared

Obviously it cant hold true for both. I didn't see this one on errata list (to my big surprise) therefor the topic.

If I'm not following the logic, much appreciation for explanation!
checked-exception.png
[Thumbnail for checked-exception.png]
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Artem Lovan wrote:Obviously it cant hold true for both.



It's not obvious to me. It's certainly true that you're allowed to handle and declare checked exceptions in Java -- I've done it myself. There's nothing at all preventing you from doing it.

But you seem to be interpreting A as "It's optional to handle or declare checked exceptions", which is indeed in conflict with B and is indeed false. I suppose that isn't exactly an incorrect interpretation of "allowed to" but it isn't a useful way to think about questions in a formal system.
 
Artem Lovan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My understanding is that its not an option to handle or declare, it's always a requirement to either handle a checked exception or declare it.

But thinking about your post, it might be that I'm looking at "allowed to" from different angle as it was thought of in the explanation.. Thanks!
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, I'd be taken off-guard too if I saw the statement "You are allowed to pay your income tax" as an option in a financial literary quiz. Yeah, it's literally true but when you put it up against the idea of being required to pay your income tax all of a sudden it takes on a different meaning.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Artem Lovan wrote:Obviously it cant hold true for both. I didn't see this one on errata list (to my big surprise) therefor the topic.


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).

Hope it helps!
Kind regards,
Roel
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic