A one-page visual summary of Data Collections — every collection, traversal, algorithm, and exam trap you need, on a single screen.
What it covers: Arrays, array traversals and algorithms, text files, wrapper classes, ArrayList, 2D arrays, searching, sorting, and recursion.
Exam weight: About 30–40% of the multiple-choice section — the largest unit — and central to the Data Analysis free-response question.
The big question: How do you store, traverse, search, and sort collections of data?
Computational thinking practices: Design Code, Develop Code, Analyze Code, Document Code, and Use Computers Responsibly.
Fixed-size, indexed by 0 to length−1. Size is arr.length (a field, no parentheses). Out-of-range access throws ArrayIndexOutOfBoundsException.
Standard for (int i = 0; i < arr.length; i++) gives index access; the enhanced for (int x : arr) reads each element but can’t assign or remove.
Resizable list of objects. Methods: add, get(i), set(i,x), remove(i), size(). Uses .size(), not .length. Stores wrapper types (ArrayList<Integer>).
remove(i) shifts elements left. Removing in a forward loop skips the next element — don’t always increment i, or loop backwards.
Integer and Double box primitives as objects. Autoboxing/unboxing convert automatically between int/Integer and double/Double.
A grid: matrix[row][col]. Rows = matrix.length, columns = matrix[0].length. Traverse with nested loops (row-major).
Sequential/linear: check each element (works unsorted, up to n). Binary: check the middle of a sorted array, halve each step — far faster.
Selection sort (swap in the smallest), insertion sort (insert into sorted region). Recursion = a method calling itself with a base case + recursive case; merge sort and recursive binary search.