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

Explanation

Core Concept

No element exists at index 0.

Correct Answer

Aan IndexOutOfBoundsException

More Unit 7: ArrayList practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 7: ArrayList Questions →