AP Computer Science Amediummcq1 pt

An ArrayList is preferable to an array when

A.the number of elements changes during execution
B.the size is fixed and known
C.only primitives are stored
D.memory must be minimal

Explanation

Core Concept

ArrayLists resize automatically.

Correct Answer

Athe number of elements changes during execution

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 →