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!");
}
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. ArithmeticException
Answer: Option B
Join The Discussion