Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
Sheriff
Posts: 35976
422
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!