Vidyalelo
Java Programming · Q6

Exceptions

Programming · Java Programming · question 6

Q6

In Java, can a "catch" block catch multiple exceptions?

A.
No, a "catch" block can only catch one exception
B.
Only if the "catch" block is marked as "static"
C.
Only if the exceptions are marked as "final"
D.
Yes, a "catch" block can catch multiple exceptions using the pipe ( | ) symbol
Answer

Answer: Option D

Solution

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