Identify whether the following statement is true or false.
The finally block is executed when an exception is thrown, even if no catch matches it.

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) True - This option is correct because the finally block is executed when an exception is thrown, even if no catch matches it. The finally block is a block of code that is always executed, regardless of whether an exception is thrown or not.

Option B) False - This option is incorrect because the statement is actually true. The finally block is executed when an exception is thrown, even if no catch matches it.

The correct answer is A. The finally block is executed when an exception is thrown, even if no catch matches it.

Find more quizzes: