What happens when an exception is thrown in the finally block?

  1. It is ignored
  2. It overrides previous exception
  3. It crashes the program
  4. It cancels finally
Correct answer It overrides previous exception

Explanation

If an exception is thrown in finally, it can override the original exception.

Update: Admin added a tag on this question

Topics

By Admin · · 23 views