+1 vote
in Data Structures & Algorithms I by (110k points)
When does the ArrayIndexOutOfBoundsException occur?

(a) Compile-time

(b) Run-time

(c) Not an error

(d) Not an exception at all

Enquiry is from Array and Array Operations in portion Abstract Data Types of Data Structures & Algorithms I

The question was asked by my school principal while I was bunking the class.

1 Answer

+2 votes
by (412k points)
selected by
Best answer
The correct answer is (b) Run-time

Easy explanation - ArrayIndexOutOfBoundsException is a run-time exception and the compilation is error-free.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.