Java Programming
primer-original-v2mediumJavaException HandlingFinallyprimer-original-v2

In which scenario does a finally block NOT execute?

Answer options

A
When the try block throws an exception
B
When the catch block throws an exception
C
When System.exit() is called in the try block
D
When the try block completes normally

Correct answer: When System.exit() is called in the try block

Detailed Solution & Conceptual Analysis

This question has been retained as-is due to its unique context.

Key Engineering Takeaway

In Java Programming, understanding the underlying mechanics of Java is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Java Programming questions

Practice more Java Programming questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.