AP Computer Science A Study Guide

Last reviewed 2026-06-26

AP Computer Science A is an introductory programming course taught in Java. It rewards a small set of habits — reading code carefully, tracing it by hand, and writing clean, correct methods — far more than it rewards memorizing syntax trivia. The exam pairs multiple-choice code questions with free-response problems where you write Java by hand. This guide maps which topics carry the points, how to study them, and how to use the free practice sets on this page.

In-content ad

What AP Computer Science A covers

The course teaches programming fundamentals through Java. You begin with primitive types and expressions, then learn to use objects by calling methods on existing classes (notably String and the Math library). From there you add the control structures that drive every program: boolean expressions and if statements, then iteration with while and for loops.

The second half is about building and organizing your own code. You learn to write classes with instance variables, constructors, and methods, and to think in terms of objects and encapsulation. You then work with collections of data — arrays, the resizable ArrayList, and 2D arrays — and with two ideas that tie the course together: inheritance (sharing and specializing behavior across related classes) and recursion (solving a problem in terms of a smaller version of itself). If you can trace what a piece of code does line by line, almost everything else follows.

Where the points are

The course is organized into ten skill units. The College Board does not publish a single fixed percentage per unit, but in practice the exam leans heavily on the topics that show up everywhere:

  • Iteration, arrays, ArrayList, and 2D arrays — loops over data are the backbone of both the multiple-choice and free-response sections.
  • Writing classes — designing a class from a specification is a recurring free-response task.
  • Using objects, booleans, and if statements — the everyday glue of every program.
  • Inheritance and recursion — fewer questions, but they reliably appear and separate strong scores from average ones.

The practical takeaway: get loops and arrays automatic first, because nearly every free-response problem asks you to traverse or build a collection. Inheritance and recursion are worth deliberate, focused practice precisely because students under-study them.

How to study for it

Programming is learned by writing and tracing code, not by reading about it. A routine that works:

  1. Trace code by hand. For multiple-choice, write out variable values step by step. A short example:
int total = 0;
for (int i = 1; i <= 3; i++) {
  total += i;
}
// total is 6

Knowing exactly how a loop updates each variable is the single most tested skill.
2. Write methods from specifications. The free-response section gives you a method header and a description; practice turning words into working Java, including edge cases like empty arrays.
3. Mind the boundaries. Off-by-one errors and ArrayIndexOutOfBoundsException come from loop bounds. Always check the first and last iteration.
4. Learn the required method signatures. Know how String methods, ArrayList operations, and Math calls are written so you don't lose points on syntax.
5. Review with full explanations. Understanding why a tempting wrong answer is wrong — usually a subtle tracing error — is worth more than grinding new questions.

Common mistakes that cost points

  • Off-by-one loop bounds — using <= where < belongs, or starting at the wrong index.
  • Confusing == with .equals() when comparing objects like Strings.
  • Index errors on arrays and ArrayLists, especially when removing items while looping forward.
  • Forgetting that int division truncates5 / 2 is 2, not 2.5.
  • Mishandling null and uninitialized objects, which throws a NullPointerException.
  • Skipping edge cases in free-response — empty collections, single-element arrays, and the first/last position.
  • Confusing a superclass reference with the overridden method that actually runs at runtime.

Use this page to practice

Every unit below has a focused practice set with full written explanations and a rationale for every wrong choice, so you can see exactly where a trace went wrong. Start with iteration and arrays, then drill inheritance and recursion, and finish with mixed sets that force you to choose the right tool under exam-like pressure. It's free and needs no account.