AP Computer Science Aeasymcq1 pt
Given int[] a = {1, 2, 3}, accessing a[3] causes
A.an exception
B.0 to be returned
C.3 to be returned
D.a compile error
Index 3 is out of bounds for length 3.
Aan exception
Practice more AP Computer Science A questions with full explanations
Practice Unit 6: Array Questions →