Examveda
Examveda

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

C. Runtime exception

D. Arithmetic Exception!

Answer: Option B


This Question Belongs to Java Program >> Exceptions

Join The Discussion

Related Questions on Exceptions