Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Possible error in exam 2 for OCAJP 8

 
Leandro Galvan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic