Vidyalelo
Java Programming · Q19

Exceptions

Programming · Java Programming · question 19

Q19

In Java, can a "catch" block catch exceptions of a superclass type?

A.
Yes, a "catch" block can catch exceptions of a superclass type
Answer
B.
No, a "catch" block can only catch exceptions of the exact type
C.
Only if the superclass is marked as "final"
D.
Only if the subclass is marked as "static"

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board