AP Computer Science A Unit Tests
Pick a unit to drill it head-on. Each unit has 4 different test variations so you can keep retaking until you master it.
Unit 1: Primitive Types
Variables, primitive data types, expressions, and casting.
5 questions ยท ~8 minsmall bank โ variations may overlap
Unit 2: Using Objects
Object instantiation, methods, the String class, and the Math class.
5 questions ยท ~8 minsmall bank โ variations may overlap
Unit 3: Boolean Expressions & If Statements
Boolean logic, if/else, equivalent boolean expressions, and short-circuit eval.
4 questions ยท ~6 minsmall bank โ variations may overlap
Unit 4: Iteration
while loops, for loops, nested loops, and informal runtime analysis.
4 questions ยท ~6 minsmall bank โ variations may overlap
Unit 5: Writing Classes
Constructors, encapsulation, accessor/mutator methods, and scope.
5 questions ยท ~8 minsmall bank โ variations may overlap
Unit 6: Array
Array creation, traversal, and common algorithms.
4 questions ยท ~6 minsmall bank โ variations may overlap
Unit 7: ArrayList
ArrayList methods, traversal, and standard algorithms.
4 questions ยท ~6 minsmall bank โ variations may overlap
Unit 8: 2D Array
2D array traversal, row-major / column-major ordering, and algorithms.
4 questions ยท ~6 minsmall bank โ variations may overlap
Unit 9: Inheritance
Subclasses, super, polymorphism, Object methods, and overriding.
6 questions ยท ~9 minsmall bank โ variations may overlap
How unit tests work
- Focused on a single AP unit, between a single-topic quiz and the full diagnostic.
- 4 variations per unit โ pick a fresh variation any time you retake.
- Roughly 90 seconds per question โ the same pacing as the AP exam.
- You'll get a unit-level score, recommended topics to review, and a question-by-question explanation.
About the AP Computer Science A exam
AP Computer Science A is a college-level introduction to programming taught entirely in Java. The course centers on object-oriented design: students learn to write, analyze, and debug code using primitive types, objects, methods, control structures, classes, inheritance, and data collections. The current course is organized into four units. Unit 1, Using Objects and Methods, introduces variables, expressions, String methods, and calling existing classes. Unit 2, Selection and Iteration, covers boolean logic, if/else statements, and while and for loops. Unit 3, Class Creation, teaches students to write their own classes with constructors, instance variables, accessor and mutator methods, inheritance, and polymorphism. Unit 4, Data Collections, covers arrays, ArrayLists, 2D arrays, and searching and sorting algorithms. Beyond syntax, the exam rewards algorithmic thinking: tracing code by hand, predicting output, and reasoning about how data moves through nested loops and method calls. Students most often struggle when they memorize syntax without understanding how reference variables, object aliasing, and method return values actually behave. The free-response section demands clean, complete Java written under time pressure, so fluency with ArrayList traversal and 2D array indexing is essential. Effective preparation pairs daily hands-on coding with deliberate practice tracing released free-response questions and reviewing the official Java Quick Reference, which lists the only library methods you are expected to know. Strong students also rehearse common patterns: building and filtering ArrayLists, traversing 2D arrays row by row, and overriding inherited methods. Mastery comes from writing code, not just reading it.
Exam structure
Two equally weighted sections over 3 hours: Section I is 42 multiple-choice questions in 90 minutes (50% of score), and Section II is 4 free-response questions in 90 minutes (50%) covering methods/control structures, class design, ArrayList data analysis, and 2D arrays. Delivered digitally in Bluebook.
Scoring
Raw points from the multiple-choice and free-response sections are combined and converted to the AP 1-5 scale.
Common mistakes
- Off-by-one errors in array and ArrayList loops, especially using <= instead of < or indexing at length instead of length-1
- Confusing reference equality (==) with .equals() when comparing Strings and objects
- Mishandling ArrayList removal while iterating, which skips elements because indices shift after each remove
- Forgetting to traverse 2D arrays correctly (row index first, then column) or mixing up the outer and inner loop bounds
- Writing incomplete free-response code that ignores method return types, missing return statements, or required parameters