Multiple choice technology programming languages

An exception can be caught by a catch block with an argument type that is a superclass of the thrown exception.

  1. True

  2. False

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

In exception handling hierarchies, a catch block can catch exceptions of its declared type or any subclass of that type due to polymorphism. If you catch Exception ( superclass), it will also catch IOException, SQLException, etc. (subclasses). This is a fundamental principle of polymorphic exception handling in object-oriented programming.