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

  • (A) Compilation error
  • (B) Exception Caught!
  • (C) Runtime exception
  • (D) Bounds Exception
πŸ’¬ Discuss
βœ… Correct Answer: (B) Exception Caught!

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
218
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
83%
Success Rate