R

Rakesh Kumar • 28.44K Points
Instructor II

Q. What is the result of the following code snippet?

try {
int[] arr = new int[5];
int value = arr[10];
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("Exception Caught!");
} finally {
System.out.println("Finally Block!");
}

  • (A) Compilation error
  • (B) Exception Caught!
  • (C) Finally Block!
  • (D) Exception Caught! Finally Block!
  • Correct Answer - Option(D)
  • Views: 63
  • 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.

Be the first to start discuss.


Question analytics