Examveda
Examveda

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: Option D


This Question Belongs to Java Program >> Exceptions

Join The Discussion

Related Questions on Exceptions