?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Easy

Array Bounds

APCSA-XDZBVL

An array has 20 elements.

What happens when you try to access position 21 in the array?

A

You get a null value.

B

You get a run-time error.

C

ArrayIndexOutOfBoundsException

D

You get 0.

E

Nothing happens.