Unit 4 Day 17: ArrayList vs Array

Unit 4 - Day 17

Arraylist Vs Array

AP CSA Daily Practice
Medium
Today's Question
Which statement is TRUE about ArrayList compared to arrays?
int[] arr = new int[5]; ArrayList list = new ArrayList();
Explanation

ArrayList can grow and shrink dynamically using add() and remove(). Arrays have fixed size. ArrayList uses wrapper classes (not primitives), and uses get()/set() methods (not []).

Key Concept

ArrayList: dynamic size, objects only, uses methods. Array: fixed size, primitives OK, uses brackets.

Keep Practicing!

Consistent daily practice is the key to AP CSA success.

Try Study Games Practice FRQs
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.