Vidyalelo
Java Programming · Q12

Exceptions

Programming · Java Programming · question 12

Q12

What is the result of the following code snippet?try int num = 10 / 0; catch (ArithmeticException e) System.out.println("Arithmetic Exception!"); catch (Exception e) System.out.println("Exception!");

A.
Exception!
B.
No output
C.
Compilation error
D.
Arithmetic Exception!
Answer

Answer: Option D

Solution

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