| preferred AP College board partner for AP classes
AP Computer Science A/Unit 6: Array
Start Practice TestPractice Test
Share
About Exam
medium Solved by 4 students
ArrayIndexOutOfBoundsException Conditions
< Prev
Next >

Which of the following statements about ArrayIndexOutOfBoundsException are true except:

A

Both negative indices and indices greater than or equal to the array’s length can cause an ArrayIndexOutOfBoundsException.

B

ArrayIndexOutOfBoundsException occurs only when accessing an array element with a negative index.

C

Accessing an array index that is equal to the array length will throw an ArrayIndexOutOfBoundsException.

D

The exception indicates that the code is trying to access an index that is outside of the array’s valid range.

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer

Question Leaderboard

Not enough data yet to show leaderboard.

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy