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
| Topic | What to be able to do |
|---|---|
| Variables, types and expressions | Use int, double and boolean, integer division, %, casting |
| Using objects and String methods | Call methods on objects; use length, substring, indexOf, equals, compareTo |
| Selection and iteration | Write if/else chains, while and for loops, nested loops |
| Writing classes | Instance variables, constructors, methods, private vs public, this |
| Arrays | Traverse, count, find a maximum, shift and reverse elements |
| ArrayList | add, get, set, remove, size, and removing items safely while looping |
| 2D arrays | Row-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 type | What it asks for |
|---|---|
| Methods and control structures | Write one or two methods using loops, conditions and String methods |
| Class design | Write a whole class from a description: fields, constructor and methods |
| Data analysis with ArrayList | Search, filter, count or change items in an ArrayList of objects |
| 2D array | Traverse a 2D array to count, total or rearrange values |
The mistakes that cost the most marks
- Integer division:
7 / 2is3, not3.5. - Off-by-one loop bounds: the last index is
length - 1(arrays) orsize() - 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) andsize()(ArrayList).
An 8-week practice plan
| Weeks | Focus |
|---|---|
| 1 to 2 | Expressions, String methods, conditions and loops. Trace 10 short code snippets a day by hand. |
| 3 | Writing classes: constructors, getters, simple behaviour methods. |
| 4 | Arrays: traversal patterns (count, sum, max, shift, reverse). |
| 5 | ArrayList: the same patterns, plus safe removal while looping. |
| 6 | 2D arrays: row and column traversal. |
| 7 | Past free-response questions under time, about 22 minutes each, marked with the official scoring guidelines. |
| 8 | Full 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.
Learn it step by step
Practise this, step by step
Short lessons with quizzes, practice and interview questions, from your first program to job-ready.