• 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 error in exam 2 for OCAJP 8

 
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.

I'm doing the online mock exams and I think I've found a mistake that's not listed here: https://www.selikoff.net/java-oca-8-programmer-i-study-guide/

Question 14 of exam 2 says: Which statements are true? (Choose all that apply)

The accepted correct answers for the question are:

B: If a try block contains System.exit(0), the finally block will not run.
D: If a catch block contains System.exit(0), the finally block will not run.

However, these answers never state that the statement be actually reached.

For example, the following code contains System.exit(0) in both the try and catch block and yet the finally block executes.



Am I missing something?

Thanks!
 
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
Leandro,
Welcome to CodeRanch!

It's not an errata because you are reading into the question . With your interpretation, none of the answers would be correct.
 
Aaaaaand ... we're on the march. Stylin. Get with it 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