AP CS A · Guide

AP Computer Science A Unit 4: Data Collections

Unit 4 is the single heaviest unit on the exam — and it's the basis for two of the four free-response questions. If you master one unit, make it this one.

Updated for the 2025–26 (digital, 4-unit) exam

Data Collections accounts for roughly 30–40% of the multiple-choice questions — more than any other unit — and it directly drives the ArrayList and 2D array free-response questions. Together with Unit 2 (Selection & Iteration), it makes up the largest share of the exam.

What's in Unit 4

Arrays — the foundation

ArrayList — when the size can change

The classic trap: removing elements while looping forward shifts every later index down by one, so you skip elements. Loop backward, or don't increment the index on a removal.

2D arrays

Standard algorithms to recognize

Mistakes that cost the most points

Practice the Unit 4 free-response style

Write a method on an array or ArrayList and get it graded against a rubric — instant feedback on your loop bounds, edge cases, and return value. No account needed.

How this maps to the exam

Free-response question 3 asks you to work with an ArrayList, and question 4 asks you to traverse and manipulate a 2D array. Both reward correct loop bounds and clean traversal — exactly the Unit 4 skills above. Practicing these two question types is the most direct way to turn Unit 4 study into points.

The 2025–26 redesign consolidated the course into four units and removed inheritance, polymorphism, extends, and super from the required content, while adding File and Scanner for reading text files. Exam weighting and content can change — always confirm current details on the official College Board AP Central page. Silver is an independent study tool and is not affiliated with or endorsed by the College Board.