The AP CSA free-response section has four questions: methods and control structures, class design, data analysis with an ArrayList, and a 2D array. Together they are 45% of the exam score, and each one asks you to write Java that does exactly what a specification says. The quickest way to improve is to practise one question type at a time on official past questions and grade yourself against the scoring guidelines.
Key takeaways
- The section has 4 questions, lasts 90 minutes and is worth 45% of the exam score. Split evenly, that is about 22 minutes per question.
- The four questions cover methods and control structures, class design, an ArrayList method and a 2D array method.
- Two of the four questions test collections, the unit that makes up 30% to 40% of the whole exam.
- Past free-response questions and scoring guidelines are free on AP Central, and grading your own answers against them is the most useful practice available.
- Two slips worth drilling out of your code: off-by-one loop bounds, and removing from an ArrayList while looping forward.
What does the AP CSA free-response section look like?
Section II has four questions and lasts 1 hour 30 minutes. It is 45% of your exam score, and the multiple-choice section is the other 55%. The exam is taken in the Bluebook app, so you type your code. The College Board's AP CSA exam page and assessment page describe the four questions like this:
| # | Question type | What you write |
|---|---|---|
| 1 | Methods and Control Structures | Two methods, or one constructor and one method, using loops, conditions and String methods |
| 2 | Class Design | A full class from a scenario and a specification table: header, instance variables, constructor and a method |
| 3 | Data Analysis with ArrayList | One method that uses, analyses and changes an ArrayList |
| 4 | 2D Array | One method that uses, analyses and changes a 2D array |
How do you approach Question 1, methods and control structures?
Read the specification twice before typing. Underline every rule the method has to follow, such as what to return for an empty String or what happens at a boundary. Then write the loop and the condition that match those rules, and nothing extra.
String method calls appear in this question type, so practise methods like length, substring, indexOf and equals until you do not have to stop and think about them. Write a quick example input and walk through your code by hand before you move on.
How do you approach Question 2, class design?
Treat it as a checklist. Write the class header, declare every instance variable private as the course teaches, write a constructor that sets them, then write each method the table asks for. At the end, read the scenario once more for anything you skipped.
// A bare skeleton, not an exam question
public class Counter {
private int count; // instance variable, private
public Counter() { // constructor: class name, no return type
count = 0;
}
public int getCount() { // a method from the specification table
return count;
}
}
The constructor has the same name as the class and no return type. Forgetting either is an easy way to lose a point on a question you otherwise understood.
How do you approach Question 3, the ArrayList question?
Decide first whether you only need to read the list or also change it. Reading is a plain loop. Changing is where marks slip away, especially removal. If you remove an item while looping from the front, everything after it moves one place left and the next item gets skipped. Looping from the back avoids the problem.
// Example only: remove every negative number from a list
for (int i = list.size() - 1; i >= 0; i--) {
if (list.get(i) < 0) {
list.remove(i);
}
}
Removing inside an enhanced for loop usually throws a ConcurrentModificationException when the code runs, so use an index loop when you need to remove.
How do you approach Question 4, the 2D array question?
Decide what a row and a column are before you write a loop. For a rectangular array, grid.length is the number of rows and grid[0].length is the number of columns. A row-by-row traversal puts the row loop on the outside and the column loop inside. Mixing up the two indexes is the classic mistake, so name the variables row and col instead of i and j.
// Example only: add up every value in a rectangular 2D array
int total = 0;
for (int row = 0; row < grid.length; row++) {
for (int col = 0; col < grid[0].length; col++) {
total += grid[row][col];
}
}
What does a good weekly practice routine look like?
- Pick one question type for the week and open three questions of that type from AP Central's past exam questions.
- Do each one in a timed 22 minutes, typing in a plain editor with no hints from an IDE.
- Grade yourself with the scoring guidelines for that year, line by line, and mark every point you missed.
- Keep an error log with one line per lost point and its cause: misread the specification, off-by-one, wrong method, forgot the constructor.
- A few days later, redo the weakest question from scratch.
I would not skip the error log. It turns a vague "I'm bad at ArrayLists" into a specific habit you can fix, and after two weeks the most common cause stands out.
Frequently asked questions
How long should I spend on each free-response question?
The section is 90 minutes for four questions, so about 22 minutes each if you split it evenly. Some students spend less on Question 1 and more on the class or collection questions. Decide your plan before exam day, not during it.
Where can I find real past AP CSA free-response questions?
On AP Central, the College Board's site for AP teachers and students. It has past free-response questions and scoring guidelines for AP Computer Science A.
Which unit matters most for the free-response section?
Data Collections, because Questions 3 and 4 are about ArrayList and 2D arrays. The College Board's AP CSA course page gives that unit 30% to 40% of the whole exam, the largest share of any unit.
Sources
- College Board: AP Computer Science A exam overview
- College Board: AP Computer Science A assessment
- College Board: AP Computer Science A past exam questions
- College Board: AP Computer Science A course page