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

Explanation

Quick AnswerThe correct answer is When System.exit() is called in the try block because it directly addresses the core logic of Java Programming.

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

Related Java Programming questions

Practice more Java Programming questions

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