AP Computer Science A: The Complete
5-Scorer Mastery Guide
All 10 Units, Java Mechanics, 1D/2D Arrays & ArrayList, Inheritance &
Polymorphism, Recursion, Searching & Sorting, 4 Fully Worked FRQs, and 10
Fatal Traps
Advanced Placement Computer Science | Course Code: AP Computer Science A | 2026-2027
Comprehensive Exam Edition
📘 WHAT’S INSIDE THIS GUIDE:
✔ Exam Anatomy & Pacing: 40 Multiple-Choice (90 min) + 4 Free-Response (90 min), each worth 50%
of the composite
✔ Units 1-2: Primitive types, integer division, casting, and the String / Math class method arsenal
✔ Unit 3: Boolean logic, De Morgan's laws, and the dangling-else trap
✔ Unit 4: for / while / nested iteration, off-by-one errors, and string traversal
✔ Unit 5: Writing classes, encapsulation (private fields), constructors, and static vs instance
✔ Unit 6-7: 1D arrays and ArrayList, including the remove-during-traversal pitfall
✔ Unit 8: 2D arrays, ragged arrays, and row-length vs column-length
✔ Unit 9: Inheritance, method overriding, super, and dynamic (runtime) binding
✔ Unit 10: Recursion, base cases, and tracing the call stack by hand
✔ Searching & Sorting: sequential / binary search traces and selection / insertion / merge sort
✔ 4 Fully Worked AP-Style FRQs: step-by-step solutions with point-by-point scoring rubrics
✔ 10 Fatal AP Grader Traps and a Pre-Exam Emergency Quick-Reference with 25 active recall flashcards
Disclaimer: This is an independently created academic study aid. It is not affiliated with, endorsed by, or sponsored by any specific
university, textbook author, or publisher.
,Advanced Placement Computer Science · AP Computer
Science A AP Computer Science A: The Complete 5-Scorer Mastery Guide
1 AP Computer Science A: Exam Anatomy & Pacing Strategy
1.1 Exam Architecture & Section Timings
The AP Computer Science A Exam is 3 hours long, split into two equally weighted sections. There is
no calculator (and none is needed) — every question is about reading and reasoning about Java code.
Section Time Items What It Tests
Section I: Multiple 90 min 40 MCQ Reading code, predicting output,
Choice tracing loops and recursion, reason-
ing about objects.
Section II: Free Re- 90 min 4 FRQ Writing methods and classes: ar-
sponse ray/ArrayList processing, 2D arrays,
class design, inheritance/recursion.
1.2 Unit Weight Distribution
The ten units are not tested uniformly. The College Board weighting below tells you where to spend
review time.
Unit Weight Core Subskills
1. Primitive Types 2.5-5% int / double / boolean, integer division,
casting.
2. Using Objects 5-7.5% String and Math methods, immutability.
3. Boolean & if 15-17.5% Relational/logical operators, De Morgan,
selection.
4. Iteration 17.5-22.5% for / while, nested loops, string traversal.
5. Writing Classes 5-7.5% Fields, constructors, encapsulation, static.
6. Array 10-15% 1D array traversal, swapping, Arrays meth-
ods.
7. ArrayList 2.5-7.5% add / remove / get / set, wrapper classes.
8. 2D Array 7.5-10% Nested traversal, ragged arrays.
9. Inheritance 5-10% extends, override, polymorphism.
10. Recursion 5-7.5% Base case, recursive step, tracing.
Searching & Sorting part of Units 6/10 Binary search, selection/insertion/merge
sort.
KEY TAKEAWAY
Units 3 (Boolean/if) and 4 (Iteration) together are roughly 35% of the exam, and they appear
inside almost every Free-Response question. If you can read a loop and a conditional correctly, you
can score on the majority of items. Master these two before anything else.
Independent study aid. Not affiliated with or endorsed by any university or publisher. Page 2 of 16
, Advanced Placement Computer Science · AP Computer
Science A AP Computer Science A: The Complete 5-Scorer Mastery Guide
—
2 Units 1-2: Primitive Types & Using Objects
2.1 Primitive Types and Integer Division
Java has eight primitive types; the three you must know cold are int, double, and boolean. The single
most-tested trap in Unit 1 is integer division: when both operands are integers, the result is an integer
with the fractional part discarded (truncated toward zero), never rounded.
int a = ; // 3, NOT 3.5
double b = 7.; // 3.5
double c = .0; // 3.5
int d = (int) (7.); // 3 (cast truncates; does NOT round)
double e = Math.round(7..0); // 4.0 (rounds to nearest long)
Casting (int) truncates toward zero. To round, use Math.round. To force a floating-point division from
two ints, promote at least one operand to double.
2.2 The String Class Method Arsenal
String objects are immutable — every method returns a new String; the original is never changed.
This is the second most-tested idea after integer division.
String s = "AP Computer Science A";
s.length(); // 22
s.indexOf("Comp"); // 3 (first occurrence; -1 if absent)
s.substring(3, 12); // "Computer" (from index 3, up to but NOT including 12)
s.substring(3); // "Computer Science A"
s.charAt(0); // 'A'
s.equals("AP"); // false (NEVER use == for String content!)
s.compareTo("AP"); // 0 if equal, <0 if this < arg, >0 otherwise
s.toUpperCase(); // "AP COMPUTER SCIENCE A" (does not mutate s)
COMMON PITFALL: substring IS [start, end)
substring(begin, end) includes the character at begin and excludes the character at end. The length
of the returned string is always end - begin. Off-by-one errors here are the most common reason a
string-processing FRQ loses points.
2.3 The Math Class
Math methods are static, called as Math.method(...). Remember Math.random() returns a double in
[0, 1).
Independent study aid. Not affiliated with or endorsed by any university or publisher. Page 3 of 16