• 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

OCA 8 - Java SE 8 Programmer I (1Z0-808) Review question of Chapter 6 exceptions

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Just finishing up reading and making the review questions of the OCA Exam 1Z0-808 Study Guide by Boyarsky and Selikoff.
I stumbled upon a question in Chapter 6 Exceptions which the answer doesnt seem logical.

Its question 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

According to the Answer the right options are: A, B, C and E.
But I dont understand why A is right. Because are allowed means to me its not necessary.  And Checked exceptions always need to be handled or declared.
Or do i interpretate A wrong?
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hate these type of questions, I really don't get the purpose of these type of questions on exam.
I think that "A" is "they are allowed to be handled OR declared" in sense you don't have to do both.
And "B" is " required to be 'handled-or-declared' " (like rule handle or declare) if that makes sense to you. It's really pointless in my opinion
 
Marshal
Posts: 79179
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please tell us where such questions come from. Please check the question carefully whether it says Runtime exceptions as you wrote, or RuntimeExceptions.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Asish,
Welcome to CodeRanch!

There was a lot of debate about that question.

The intent was that allowed means "can be, but doesn't have to" and required means "must be". We considered allowed to be a subset of required. So if something is required to be handled, it is also allowed to be handled. That said, we agree this is confusing and have change the question for our Java 11 cert book. While the exam does have some word problems, they aren't on the definition of the word "allowed"

Also, the real exam tells you how many answers are right. If this said "choose 4", you'd have gotten it right. You'd get B, C and E right away. Then you'd puzzle on the others and conclude that A is "more right" than D/F which are clearly wrong!
reply
    Bookmark Topic Watch Topic
  • New Topic