Skip to main content

AP Computer Science A study guide: what to learn and how to practise

8 min readUpdated

AP Computer Science A (AP CSA) is a college-level course in Java. The exam rewards steady practice more than last-minute reading: tracing code by hand, writing short methods and working with arrays, ArrayLists and 2D arrays. This guide lists what to learn, how the exam is built and a week-by-week plan. Always check College Board's current course and exam description for the latest details.

The Java you need for AP CSA

TopicWhat to be able to do
Variables, types and expressionsUse int, double and boolean, integer division, %, casting
Using objects and String methodsCall methods on objects; use length, substring, indexOf, equals, compareTo
Selection and iterationWrite if/else chains, while and for loops, nested loops
Writing classesInstance variables, constructors, methods, private vs public, this
ArraysTraverse, count, find a maximum, shift and reverse elements
ArrayListadd, get, set, remove, size, and removing items safely while looping
2D arraysRow-major and column-major traversal, row and column totals
Recursion (reading)Trace what a short recursive method returns

How the exam is built

The exam has a multiple-choice section, where many questions ask what a piece of code prints or returns, and a free-response section where you write Java by hand. The free-response questions follow four familiar shapes, so practising each shape is the best use of your time.

Free-response typeWhat it asks for
Methods and control structuresWrite one or two methods using loops, conditions and String methods
Class designWrite a whole class from a description: fields, constructor and methods
Data analysis with ArrayListSearch, filter, count or change items in an ArrayList of objects
2D arrayTraverse a 2D array to count, total or rearrange values

The mistakes that cost the most marks

  • Integer division: 7 / 2 is 3, not 3.5.
  • Off-by-one loop bounds: the last index is length - 1 (arrays) or size() - 1 (ArrayList).
  • Comparing Strings with == instead of .equals(...).
  • Removing from an ArrayList while looping forwards, which skips the next element. Loop backwards instead.
  • Forgetting to return a value on every path of a method.
  • Confusing length (arrays), length() (String) and size() (ArrayList).

An 8-week practice plan

WeeksFocus
1 to 2Expressions, String methods, conditions and loops. Trace 10 short code snippets a day by hand.
3Writing classes: constructors, getters, simple behaviour methods.
4Arrays: traversal patterns (count, sum, max, shift, reverse).
5ArrayList: the same patterns, plus safe removal while looping.
62D arrays: row and column traversal.
7Past free-response questions under time, about 22 minutes each, marked with the official scoring guidelines.
8Full timed practice exams; review every wrong multiple-choice answer.

College Board publishes past free-response questions with scoring guidelines on AP Central. Marking your own answers against them is the fastest way to learn what examiners reward.

Frequently asked questions

Is AP Computer Science A hard?

It is very manageable with regular practice. Students who trace code by hand and write a few short methods every week usually do well, even without prior coding experience.

How long should I study for the AP CSA exam?

Alongside the class, about 8 weeks of focused review works well: a few hours a week on topics, then timed free-response practice in the last weeks.

Do I need to know Java before taking AP CSA?

No. The course teaches Java from the start, but learning variables, conditions and loops beforehand makes the first weeks much easier.

Which Java features are not tested?

AP CSA uses a subset of Java listed in the Java Quick Reference. Keyboard input with Scanner, most of the standard library and advanced features are not part of the exam.

Practise this, step by step

Short lessons with quizzes, practice and interview questions, from your first program to job-ready.

Java Programming course: syllabus and 1:1 mentoringCore Java from zero to OOP, collections, streams, files and threads.