A

Admin • 831K Points
Coach

Q. 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!
  • Correct Answer - Option(D)
  • Views: 13
  • Filed under category Java
  • Hashtags:

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.

Be the first to start discuss.