Vidyalelo
Java Programming · Q10

Exceptions

Programming · Java Programming · question 10

Q10

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

A.
Compilation error
B.
Exception Caught!
Answer
C.
Runtime exception
D.
Bounds Exception

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board