What is the result of the following code snippet?
try {
int result = 10 / 0;
} catch (ArithmeticException e) {
System.out.println("Arithmetic Exception!");
} finally {
System.out.println("Finally Block!");
}
int result = 10 / 0;
} catch (ArithmeticException e) {
System.out.println("Arithmetic Exception!");
} finally {
System.out.println("Finally Block!");
}
A. No output
B. Finally Block!
C. Arithmetic Exception!
D. Arithmetic Exception!
Finally Block!
Answer: Option D
Join The Discussion