Vidyalelo
Java Programming · Q27

Exceptions

Programming · Java Programming · question 27

Q27

In Java, can a "try" block have multiple "catch" blocks?

A.
No, a "try" block can have only one "catch" block
B.
Only if the "try" block is marked as "static"
C.
Yes, a "try" block can have multiple "catch" blocks to catch different types of exceptions
Answer
D.
Only if the "catch" blocks are marked as "final"

Answer: Option C

Solution

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