AP Computer Science Aeasymcq1 pt

Accessing an index equal to the array length causes

A.an ArrayIndexOutOfBoundsException
B.a compile error
C.null to be returned
D.0 to be returned

Explanation

Core Concept

Valid indexes are 0 to length minus one.

Correct Answer

Aan ArrayIndexOutOfBoundsException

More Unit 6: Array practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 6: Array Questions →