Vidyalelo
Java Programming · Q28

Exceptions

Programming · Java Programming · question 28

Q28

What is the result of the following code snippet?try throw new ArithmeticException(); catch (Exception e) System.out.println("Exception!"); catch (ArithmeticException e) System.out.println("Arithmetic Exception!");

A.
Arithmetic Exception!
B.
Compilation error
Answer
C.
Runtime exception
D.
ArithmeticException

Answer: Option B

Solution

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