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!