Multiple choice technology programming languages

Can multiple catch blocks be executed for a single try statement? In other words can code inside multiple catch blocks be executed?

  1. No

  2. In certain conditions

  3. Yes

  4. None

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When an exception is thrown, the first matching catch block handles it and no other catch blocks execute for that exception. Multiple catches are for different exception types, not multiple executions. Control transfers to finally or after the catch blocks.