AP Computer Science A FRQ Guide 2026 — All 4 Question Types with Java Examples

The AP Computer Science A free response section has 4 questions in 90 minutes. Each question focuses on one of four recurring topic areas: Methods & Control Structures, Classes, Arrays/ArrayLists, and 2D Arrays. This guide covers every question type with Java code templates, scoring rubrics, and the most common errors that cost points.

Exam Format Overview

SectionContentTimeWeight
Section I40 Multiple Choice Questions90 min50%
Section II4 Free Response Questions90 min50%

Budget roughly 22 minutes per FRQ. The questions are independent — you can do them in any order. Most students find Q1 (methods) the most approachable and Q4 (2D arrays) the most time-consuming.

How FRQs Are Scored

Each FRQ is worth 9 points, for a total of 36 points. Points are awarded for specific correct elements of the solution — not holistically. This means:

  • You can earn partial credit even with a wrong final answer
  • Correct logic with a minor Java syntax error may still earn most points
  • An algorithmically wrong solution with correct Java syntax earns very few points
Key scoring principle: Graders check for specific "response elements" — each correct programming construct (loop, conditional, method call, return statement) is a potential point. Write clean, readable code with the correct algorithmic logic. Minor syntax errors are penalized only once per type.

Grading Penalty Rules

  • Missing semicolons: penalized only once per response (not per occurrence)
  • Array access out of bounds in an otherwise-correct loop: penalized once
  • Using the wrong access modifier (public vs. private): not penalized if the logic is correct
  • Returning void instead of the correct type: will lose the return-type point but not all points
  • Calling a method with wrong number of arguments: loses that method-call point

Question 1 — Methods & Control Structures

Question 1 provides an existing class with some methods already written and asks you to write one or two additional methods using iteration (loops) and/or conditionals. You must use the given class's existing methods correctly.

Q1 Template Approach

Given: A class with methods like getScore(), getName(), isActive(). You're asked to write a method like getBestScore() or countActive().

// Pattern: iterating over an ArrayList and filtering/accumulating public int countAboveAverage(ArrayList<Student> students, double threshold) { int count = 0; for (Student s : students) { // enhanced for loop - preferred if (s.getScore() > threshold) { // use getter, not direct field access count++; } } return count; // must return }
Q1 tips:
  • Always use the class's provided getter methods — do not access fields directly
  • Prefer the enhanced for loop (for (Type x : list)) over an index loop when you don't need the index
  • Check whether the question says to return a value or modify something
  • If you need to find a maximum, initialize your variable to the first element, not to 0 or Integer.MIN_VALUE

Question 2 — Classes

Question 2 asks you to design a complete class from scratch. You are given specifications for instance variables, a constructor, and several methods. You must implement all of them correctly.

Class Design Checklist

  1. Declare private instance variables at the top
  2. Write the constructor — initialize all instance variables using the parameters
  3. Write getter and setter methods as specified
  4. Write any additional methods using this (implicit) to access instance variables
  5. Make sure every non-void method has a return statement
// Complete class template public class BankAccount { private String owner; // private instance variables private double balance; public BankAccount(String owner, double initialBalance) { // constructor this.owner = owner; balance = initialBalance; // "this." optional when no ambiguity } public String getOwner() { // getter return owner; } public void deposit(double amount) { // void method modifying state balance += amount; } public boolean withdraw(double amount) { // returns boolean if (amount > balance) { return false; } balance -= amount; return true; } }
Common Q2 mistakes: Forgetting to declare instance variables as private; writing the constructor with the wrong parameter names (colliding with instance variable names without using this.); omitting the return statement in non-void methods.

Question 3 — Arrays & ArrayLists

Question 3 typically has two parts — one working with a 1D array and one working with an ArrayList. Common tasks: searching, filtering, removing elements, or traversing to compute a value.

Array vs ArrayList — Key Differences

OperationArray (int[])ArrayList (ArrayList<Integer>)
Access elementarr[i]list.get(i)
Set elementarr[i] = vallist.set(i, val)
Length/sizearr.lengthlist.size()
Add elementNot possible (fixed size)list.add(val)
Remove elementNot possiblelist.remove(i)

ArrayList Removal — The Index Trap

When removing elements from an ArrayList while iterating, you MUST iterate backwards (or adjust the index) to avoid skipping elements:

// WRONG - skips elements after removal: for (int i = 0; i < list.size(); i++) { if (list.get(i) < 0) { list.remove(i); // after removal, next element is now at index i — it gets skipped! } } // CORRECT - iterate backwards: for (int i = list.size() - 1; i >= 0; i--) { if (list.get(i) < 0) { list.remove(i); // safe — only affects indices AFTER i } } // ALSO CORRECT - adjust index after removal: for (int i = 0; i < list.size(); i++) { if (list.get(i) < 0) { list.remove(i); i--; // back up to recheck this index position } }

Question 4 — 2D Arrays

Question 4 involves a 2D array (an array of arrays). Common tasks: traversing all elements, summing a row/column, finding a maximum in a region, or comparing values across rows and columns.

2D Array Traversal Patterns

// Standard row-by-row traversal (row-major order) for (int row = 0; row < grid.length; row++) { for (int col = 0; col < grid[0].length; col++) { // access: grid[row][col] System.out.print(grid[row][col] + " "); } System.out.println(); } // Column-by-column traversal for (int col = 0; col < grid[0].length; col++) { for (int row = 0; row < grid.length; row++) { System.out.print(grid[row][col] + " "); } } // Enhanced for loop (read-only — cannot modify elements) for (int[] row : grid) { for (int val : row) { System.out.print(val + " "); } }
2D array dimensions:
  • grid.length = number of rows
  • grid[0].length = number of columns (assuming rectangular array)
  • grid[row][col] — first index is row, second is column

Finding the Maximum in a 2D Array

public static int findMax(int[][] grid) { int max = grid[0][0]; // initialize to first element, NOT 0 for (int row = 0; row < grid.length; row++) { for (int col = 0; col < grid[0].length; col++) { if (grid[row][col] > max) { max = grid[row][col]; } } } return max; }

Critical Java Rules for the FRQ

RuleCorrectWrong
String comparisons.equals("hello")s == "hello"
String lengths.length()s.length
Array lengtharr.lengtharr.length()
ArrayList sizelist.size()list.length
Null checkobj == nullobj.equals(null)
Integer division(double) a / b for decimala / b truncates to int
Boolean returnreturn x > 0;if (x > 0) return true; else return false;

5 Most Common AP CS A FRQ Mistakes

1. Using == to compare Strings
In Java, == compares object references, not content. "hello" == "hello" may be false even if both values are the same. Always use .equals() for String comparison. This is the single most common error on the CS A FRQ.
2. Off-by-one errors in loops
The most common: using <= instead of < with array indices. For an array of length n, valid indices are 0 to n-1. for (int i = 0; i <= arr.length; i++) will throw an ArrayIndexOutOfBoundsException on the last iteration.
3. Modifying an ArrayList while iterating forward over it
Removing elements from an ArrayList using a forward loop without index adjustment skips the element immediately after the removed one. Always iterate backwards, or adjust i-- after removal.
4. Initializing a maximum to 0 instead of the first element
If all values in a list are negative, initializing max to 0 will return 0 instead of the actual maximum. Always initialize max/min to the first element of the list (arr[0] or list.get(0)).
5. Accessing fields directly instead of using getters
The FRQ often provides a class with private fields and public getters. You must use the getter methods (student.getGrade()) rather than accessing the field directly (student.grade — this won't compile if the field is private, and even if it compiles in your test, the grader checks for correct method use).
SM
Sarah Mitchell В· AP Educator & Tutor

Sarah Mitchell has tutored AP students for 8 years and scored 5s on 11 AP exams. She writes about AP scoring strategy and exam preparation at APScoreHub.

Was this article helpful?