A

Admin • 828.03K Points
Coach

Q. What is the output?
try {
int x = 5 / 0;
} catch (Exception e) {
System.out.print("Caught");
}

  • (A) Caught
  • (B) Exception
  • (C) Runtime Error
  • (D) Nothing

Explanation by: Admin
Division by zero causes ArithmeticException, which is caught.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.