SAT / PSAT
SAT / PSAT Prep
History & Social Science
AP World History AP US History AP European History AP Human Geography AP US Government & Politics AP Psychology AP Macroeconomics AP Microeconomics
English
AP English Language & Composition AP English Literature & Composition
Math & Computer Science
AP Calculus AB/BC AP Precalculus AP Statistics AP Computer Science A AP Computer Science Principles
Sciences
AP Biology AP Chemistry AP Environmental Science AP Physics 1 AP Physics 2
World Languages & Arts
AP Spanish Language AP Art History AP Music Theory Start studying →
Unit 4 · Data Collections Flashcards Cheat Sheet Essentials Visual Review MC Practice FRQ Practice

AP Computer Science A Unit 4 Practice Questions

35 multiple-choice questions in College Board exam style. Each has four choices and a full explanation of why each option is right or wrong.

← Back to Unit 4 hub
Question 1 of 35 Score: 0/0

Strategy tips

Mind the bounds: array indices are 0 to length−1; array uses .length, ArrayList uses .size().

Trace traversals element by element: especially removals from an ArrayList.

Binary search needs sorted data; recursion needs a reachable base case.

Read the explanations even when you got it right, and for 2D arrays remember rows = matrix.length, cols = matrix[0].length.