• 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

Chapter 6 Exceptions, Question 18 from Java OCA 8 Programmer I Study Guide

 
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chapter 6 Exceptions, Question 18 from Java OCA 8 Programmer I Study Guide by Jeanne Boyarsky and Scott Selikoff

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.

Answer in the end: 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 just be B, C, E? The explanation is correct though.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We actually have a fairly lengthy discussion on this. The gist is that it is an English interpretation thing. I wrote that question and think that allowed is a subset of required making both true.

On the real exam, you'll be told how many answers are correct making this sort of thing obvious. For the book, give yourself credit whether you chose A or not.
 
Venny Ra
Greenhorn
Posts: 15
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:We actually have a fairly lengthy discussion on this. The gist is that it is an English interpretation thing. I wrote that question and think that allowed is a subset of required making both true.

On the real exam, you'll be told how many answers are correct making this sort of thing obvious. For the book, give yourself credit whether you chose A or not.



nice. thanks for replying.. I'll go through the discussion topic.
 
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

Venny Ra wrote:Chapter 6 Exceptions, Question 18 from Java OCA 8 Programmer I Study Guide by Jeanne Boyarsky and Scott Selikoff


Oh no, not that one again! It brings back memories
 
Roel De Nijs
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

Venny Ra wrote:I'll go through the discussion topic.


In short: the actual exam would have said "Select 4 correct answers" (as each question mentions the number of correct answers you have to select). So you would probably have immediately selected B, C, and E. And after some reconsideration, you would select A as well, because D and F are definitely wrong, so by elimination you get to the right answer (which is definitely a valuable test taking technique).
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my opinion this answer is not correct.

Allowed, means that you can handle it or not. But checked exeptions are required to handle!
 
Roel De Nijs
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

Sebastian Wie wrote:Allowed, means that you can handle it or not. But checked exeptions are required to handle!


I agree with you as well. But it seems related to an interpretation of the English language as you can read in this pretty lengthy discussion.

On the actual exam you'll know how many answers to select, so you'll probably select that one as well because the other possible options are definitely wrong.
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic