AP CSA FRQ Guide: All 4 Question Types With Examples
The four AP CSA FRQ types on the revised exam, with example problems, full Java solutions, the mistakes that cost points, and a plan for typed practice.
The AP CSA FRQ section has four questions in 90 minutes, worth 45% of your score: Methods and Control Structures, Class Design, Data Analysis with ArrayList, and 2D Array. Each one tests whether you can write correct Java that meets a precise specification, and on the revised exam you type your answers in Bluebook. The fastest way to improve is to learn the pattern behind each question type, practice writing it without an IDE, and check your code against the scoring guidelines line by line.
The revised AP CSA exam format
AP Computer Science A was revised for the 2025–26 school year. The inheritance unit was removed, text files and data sets were added, and the course was consolidated into four units: Using Objects and Methods, Selection and Iteration, Class Creation, and Data Collections. The exam is fully digital in Bluebook, with the Java Quick Reference available on screen.
| Section | Questions | Time | Weight |
|---|---|---|---|
| I: Multiple choice | 42 (four answer choices each) | 90 minutes | 55% |
| II: Free response | 4 | 90 minutes | 45% |
The four free-response questions are shorter than they used to be and are worth 25 points in total. Budget about 22 minutes per question, and do not let one question eat time from the other three.
The four AP CSA FRQ types
| # | Type | What you write |
|---|---|---|
| 1 | Methods and Control Structures | Two methods (or a constructor and a method). Part A uses loops or conditionals and calls other methods in the class; Part B uses String methods. |
| 2 | Class Design | A complete class from a description and example calls: header, instance variables, constructor, and at least one method. |
| 3 | Data Analysis with ArrayList | One method that uses, analyzes, or changes data in an ArrayList of objects. |
| 4 | 2D Array | One method that uses, analyzes, or changes data in a 2D array. |
Older FRQs from before the revision are still useful practice for these patterns, but note that Question 3 now focuses only on ArrayList (not one-dimensional arrays), and inheritance questions no longer appear.
Question 1: Methods and Control Structures
Here is a practice problem we wrote in the AP style.
A TicketLog class has a method getTicketsSold(int day) that returns the number of tickets sold on a given day. Part A: write bestStreak(int numDays, int goal), which returns the length of the longest run of consecutive days, from day 0 to day numDays − 1, on which tickets sold were at least goal.
public int bestStreak(int numDays, int goal) {
int best = 0;
int current = 0;
for (int day = 0; day < numDays; day++) {
if (getTicketsSold(day) >= goal) {
current++;
if (current > best) {
best = current;
}
} else {
current = 0;
}
}
return best;
}
Notice that the solution calls the provided method instead of assuming an array exists. Part A almost always expects you to use the methods the problem gives you.
Part B: write a static method countOccurrences(String text, String target) that returns the number of times target appears in text, including overlapping occurrences.
public static int countOccurrences(String text, String target) {
int count = 0;
for (int i = 0; i <= text.length() - target.length(); i++) {
if (text.substring(i, i + target.length()).equals(target)) {
count++;
}
}
return count;
}
The loop bound i <= text.length() - target.length() is the line most students get wrong. Test it mentally with text = "aaa" and target = "aa": i takes the values 0 and 1, and the method returns 2. Also use .equals, never ==, to compare Strings.
Question 2: Class Design
Write a GymPass class. A pass is created with a member name and a number of visits. checkIn() uses one visit and returns true if any remain; otherwise it returns false. getVisitsUsed() returns how many successful check-ins have occurred.
public class GymPass {
private String member;
private int visitsLeft;
private int visitsUsed;
public GymPass(String member, int visits) {
this.member = member;
visitsLeft = visits;
visitsUsed = 0;
}
public boolean checkIn() {
if (visitsLeft > 0) {
visitsLeft--;
visitsUsed++;
return true;
}
return false;
}
public int getVisitsUsed() {
return visitsUsed;
}
}
What graders look for on Class Design:
- Private instance variables with sensible types.
- A constructor that initializes every instance variable from its parameters.
- Correct method headers matching the example calls exactly: name, return type, parameters.
- State that persists. The tell is in the example calls. If a later call depends on an earlier one, that information must live in an instance variable, not a local variable.
Read the example table in the prompt slowly. It usually reveals an edge case, such as what happens when there are zero visits left.
Question 3: Data Analysis with ArrayList
A Reading class has a method getValue() that returns a double. Write removeBelow(ArrayList<Reading> readings, double min), which removes every reading whose value is less than min and returns the number removed.
public static int removeBelow(ArrayList<Reading> readings, double min) {
int removed = 0;
for (int i = readings.size() - 1; i >= 0; i--) {
if (readings.get(i).getValue() < min) {
readings.remove(i);
removed++;
}
}
return removed;
}
The backward loop matters. If you loop forward and remove the element at index i, the next element shifts into index i and your i++ skips it. Two consecutive low readings would leave one behind. Looping from the end avoids that bug entirely. (A forward loop that decrements i after each removal also works.)
Other ArrayList habits that save points:
- Use
size(),get(i),set(i, x),add(x), andremove(i), not array syntax likereadings[i]or.length. - Do not modify an ArrayList inside an enhanced for loop; that throws an exception.
- Call methods on the objects (
readings.get(i).getValue()); you cannot access their private fields.
Question 4: 2D Array
Write busiestColumn(int[][] grid), which returns the index of the column with the largest sum. If there is a tie, return the smallest such index.
public static int busiestColumn(int[][] grid) {
int bestCol = 0;
int bestSum = Integer.MIN_VALUE;
for (int c = 0; c < grid[0].length; c++) {
int sum = 0;
for (int r = 0; r < grid.length; r++) {
sum += grid[r][c];
}
if (sum > bestSum) {
bestSum = sum;
bestCol = c;
}
}
return bestCol;
}
Key points:
grid.lengthis the number of rows;grid[0].lengthis the number of columns.- Column-major traversal puts the column loop on the outside. Swapping the loops here would compute row sums.
- Using strict
>keeps the first column on a tie, which matches the specification. - Reset
suminside the outer loop, not before it.
Common mistakes on AP CSA FRQs
- Ignoring the methods you are given. If the problem provides a helper, it expects you to call it.
- Rewriting the method header incorrectly. Copy it exactly from the prompt.
- Off-by-one loop bounds, especially with
substringand when traversing tolength - 1. - Using
==for Strings or objects instead of.equals. - Returning too early inside a loop, so only the first element is checked.
- Printing instead of returning. If the method returns a value,
System.out.printlnearns nothing.
College Board's scoring guidelines have historically not penalized some minor syntax slips where your intent is clear, but do not rely on that. Check each year's published scoring guidelines to see exactly how points are awarded.
How to practice AP CSA FRQs
- Write on a plain text editor, not an IDE. The exam has no autocomplete or compiler, so practice without them.
- Time each question at about 22 minutes.
- Trace your code by hand with a small example from the prompt before moving on.
- Score yourself with the official scoring guidelines on AP Central, then run your code in an IDE afterward to catch anything you missed.
- Rotate types. Do one of each question type every week in the final month.
Use the AP Computer Science A score calculator to estimate how your multiple-choice and FRQ performance might combine. Cutoffs are estimates, since College Board does not publish them in advance.
How Ivystar can help
Ivystar tutors from schools like MIT, Stanford, and Cornell review your FRQ code against the scoring guidelines and teach the patterns behind each question type. Our AP Exam Prep program is private 1-on-1 or small group, and the AP Summer Accelerator lets you learn the course before school starts. Book a free 20-minute strategy call to get started.
Frequently asked questions
How many FRQs are on the AP CSA exam?+
There are four free-response questions in 90 minutes, worth 45% of the score: Methods and Control Structures, Class Design, Data Analysis with ArrayList, and 2D Array.
Is the AP CSA exam typed?+
Yes. The exam is fully digital in Bluebook, so you type your Java code, and the Java Quick Reference is available on screen.
Is inheritance still on AP Computer Science A?+
No. The revised course for 2025-26 removed the inheritance unit and added text files, data sets, and artificial intelligence topics.
Are old AP CSA FRQs still good practice?+
Mostly yes for the patterns, but skip inheritance questions and remember that Question 3 now focuses only on ArrayList rather than one-dimensional arrays.
Get a plan built for your student
Book a free 20-minute strategy call with Ivystar's founder. Get an A — or we work for free.