AP Computer Science Amediummcq1 pt
Calling list.get(0) on an empty list causes
A.an IndexOutOfBoundsException
B.null to be returned
C.0 to be returned
D.a compile error
No element exists at index 0.
Aan IndexOutOfBoundsException
Practice more AP Computer Science A questions with full explanations
Practice Unit 7: ArrayList Questions →