V

Vinay • 28.75K Points
Instructor II

Q. 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!");
}

  • (A) No output
  • (B) Finally Block!
  • (C) Arithmetic Exception!
  • (D) Arithmetic Exception! Finally Block!
  • Correct Answer - Option(D)
  • Views: 37
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics