College Board ยท Free Response

AP Computer Science A Free Response QuestionsFRQ Archive and Java Coding Practice (2019 to 2025)

Every released AP CS A FRQ booklet, straight from College Board, with the four question types, how Java code is scored point by point, and the coding errors Chief Readers document every year.

AP Computer Science A FRQ archive

Type
Year

7 of 7 resources

2025

1 file
  • 2025 AP Computer Science A Free Response Questions

    Free-Response Questions

    Covered: Methods and Control Structures: string processing with loops and conditionals, Class Design: complete class with fields and methods, Array or ArrayList: element manipulation and counting, 2D Array: traversal and nested row and column processing

    Open PDF

2024

1 file
  • 2024 AP Computer Science A Free Response Questions (official archive)

    Free-Response Questions ยท official archive

    Open PDF

2023

1 file
  • 2023 AP Computer Science A Free Response Questions (official archive)

    Free-Response Questions ยท official archive

    Open PDF

2022

1 file
  • 2022 AP Computer Science A Free Response Questions

    Free-Response Questions

    Open PDF

2021

1 file
  • 2021 AP Computer Science A Free Response Questions

    Free-Response Questions

    Open PDF

2019

1 file
  • 2019 AP Computer Science A Free Response Questions

    Free-Response Questions

    Open PDF

2018 and earlier

1 file
  • 2018 and earlier AP Computer Science A Free Response Questions (official archive)

    Free-Response Questions ยท official archive

    Open PDF

Section II, 90 minutes, 50% of score

FRQ section

4 total, each approximately 9 points

Questions

Methods and Control Structures, Class Design, Array or ArrayList, 2D Array

FRQ types

Syntactically correct Java code on every question

What you write

Java Quick Reference provided (String, Integer, Double, List, ArrayList)

Reference sheet

No calculator permitted on any part of the exam

Calculator

What do AP Computer Science A FRQs test?

Writing syntactically correct Java code that solves a specified problem, not describing or explaining what code does.

The free response section accounts for half of the AP Computer Science A score, and every one of its four questions requires you to produce working Java code from scratch. Where the multiple choice section tests reading and tracing code that someone else wrote, the FRQs test whether you can write your own. Each question provides a class context, a method signature, a written description of what the method must do, and sometimes helper methods you are permitted to call. Your job is to implement the body of the method correctly and without syntax errors that obscure intent. College Board's scoring guidelines award rubric points for specific behaviors: initializing variables correctly, writing loop bounds that cover all elements, returning the right type and value, and handling edge cases. A response that implements the right algorithm in the wrong Java syntax earns most of the points it would have earned, but a response that demonstrates no understanding of the required operation earns none of them. Per the AP Computer Science A Course and Exam Description published by College Board, the exam assesses all five Computational Thinking Practices, with Code Implementation (CTP 3) assessed directly on every FRQ.

The 4 AP Computer Science A FRQ types

Four distinct question types, each targeting a specific Java skill cluster, each worth approximately 9 points.

Unlike AP exams where FRQ types overlap, AP CS A assigns each of its four questions to a fixed skill category. The order in which the types appear on a given year's exam changes, but the four categories are stable across administrations. Per the AP CS A Course and Exam Description, every question requires students to write syntactically correct Java code. A Java Quick Reference sheet listing key method signatures is provided during the exam.

Methods and Control Structures

You write one or two methods that use conditionals, loops, and control flow to produce a specified result. The context is often a class that already exists; you implement the missing methods. This type directly tests Unit 3 (Boolean Expressions and if Statements) and Unit 4 (Iteration). Common operations include traversing a String character by character, counting elements that meet a condition, building and returning a new value with a loop, and handling boundary cases with if and else logic. The scoring rubric rewards each distinct logical operation: the loop, the condition, the accumulation step, and the return statement.

Class Design

You write a complete class from scratch, including private instance variables, a constructor that initializes them, at least one accessor method (getter), and at least one mutator method (setter) or behavioral method. This type directly tests Unit 5 (Writing Classes). Students must declare fields with the correct access modifier and type, write a constructor with the correct parameter list and assignment statements, and write methods with the correct return type and return statement. Common point losses include declaring variables inside the constructor body instead of as fields, using the wrong return type, or omitting the return statement entirely. If the question involves inheritance, you must call super() in the subclass constructor with the correct arguments.

Array or ArrayList

You implement one or more methods that manipulate a one dimensional array or an ArrayList parameter. This type tests Unit 6 (Array) and Unit 7 (ArrayList). Operations include searching for an element, counting elements meeting a condition, building a new collection from an existing one, removing elements during traversal, and implementing simple algorithms like find the maximum or compute a sum. Off by one errors in loop bounds are the most documented source of point loss: a loop that starts at index 1 instead of index 0, or that runs while the index is less than or equal to the length instead of strictly less than, misses or overruns one element and typically costs one or more rubric points. ArrayList removal inside an enhanced for loop causes a ConcurrentModificationException at runtime; the correct approach uses a standard indexed for loop iterating backward or building a separate result list.

2D Array

You traverse and process a two dimensional array using nested loops. This type tests Unit 8 (2D Array) and is consistently identified in Chief Reader Reports as the FRQ with the lowest mean score per available points. The question typically provides a two dimensional array of a specific element type and asks you to implement a method that scans every row and column, identifies elements meeting a condition, or computes a result across the entire grid. The most documented execution error is confusing the row index with the column index: in Java, a 2D array declared as int[][] grid is accessed as grid[row][col], where the first index selects the row and the second selects the column. Students who write grid[col][row] or who build their nested loops with the column as the outer variable and the row as the inner variable produce code that either accesses the wrong elements or throws an ArrayIndexOutOfBoundsException when the array is not square (that is, when it has different numbers of rows and columns).

How are AP Computer Science A FRQs scored?

Analytic point rubrics that award credit for each correct Java operation, not for the overall solution.

Each of the four FRQs has a College Board scoring guideline that breaks the question into discrete rubric points, typically 9 points per question for a 36 point section total. Trained College Board Readers score each response by checking whether each rubric point is met. A rubric point might require: the loop runs from index 0 to the correct upper bound, the condition correctly identifies the target elements, the return statement returns the right variable of the right type, or the constructor initializes all instance variables. The key consequence is that partial credit accumulates point by point. A response that implements the correct algorithm with an off by one error in the loop bound earns every rubric point except the loop bounds point, which might be only one of nine. A response that writes a return statement returning a local variable of the wrong type loses only the return type point, not the entire question. There is no penalty for an incorrect attempt, so a response that writes some code earns more than a blank page. Per the AP CS A scoring guidelines, responses are scored holistically for clarity: when a syntax error would prevent compilation but the intent is clear, Readers use their judgment about whether the underlying operation was correct. However, errors that obscure what the student was attempting do not earn the points for the operations they obscure.

Worked example: how a real AP Computer Science A FRQ was scored

Class Design FRQ from a recent administration. Max score 9, among the lowest mean scores of the four FRQ types.

The Class Design FRQ asks students to write a complete Java class from a written specification, including instance variables, a constructor, and multiple methods. This type is instructive for understanding how rubric points are allocated because each structural element of the class is a separate scorable unit. The rubric example below is grounded in the stable rubric patterns documented across AP CS A Class Design questions in Chief Reader Reports from 2019 through 2022, which show consistent point loss on the same structural elements year after year. Each part pairs the rubric requirement with a response that earns the point and one that does not.

  1. Declare private instance variables appropriate to the class specification

    Rubric: Point earned when the response declares one or more private instance variables with the correct data type that match what the constructor parameters and methods require. The variables must be declared at the class level, not inside the constructor body.

    Earns the point: Declaring private int count and private String label at the top of the class body, outside any method or constructor, with the correct types matching what the specification describes.

    Loses the point: Declaring the variables inside the constructor body as local variables (int count = 0 inside the constructor). These are local to the constructor and cannot be accessed by other methods. The rubric does not award the instance variable point because the variables are not fields.

  2. Write a constructor that correctly initializes the instance variables

    Rubric: Point earned when the constructor has the correct parameter list matching the specification, and each instance variable is set equal to the corresponding parameter using this.variableName or the field name directly. The assignment must go to the field, not to a local variable.

    Earns the point: Writing public ClassName(int count, String label) and inside the body writing this.count = count and this.label = label, correctly assigning the parameter values to the instance variables.

    Loses the point: Writing the constructor with the correct parameters but assigning a parameter to a local variable with the same name rather than to the field: writing int count = count inside the constructor creates a new local variable and leaves the field at its default value. The field initialization point is not earned.

  3. Write an accessor method (getter) that returns an instance variable

    Rubric: Point earned when the method has the correct return type matching the type of the instance variable, the method returns the instance variable (not a local copy or a hardcoded value), and the method signature matches the specification. A void return type or a missing return statement does not earn the point.

    Earns the point: Writing public int getCount() with return count in the body, where count is the private instance variable declared at the class level. The return type int matches the type of the variable and the specification.

    Loses the point: Writing public void getCount() with a print statement instead of a return statement, or writing public int getCount() and returning a literal like return 0 instead of the field. Both versions lose the accessor point: one has the wrong return type and no return value, the other returns the wrong value.

  4. Write a method that uses the instance variables to compute and return a result

    Rubric: Point earned when the method accesses the instance variables (not hardcoded values), performs the correct operation described in the specification, and returns the correct type. If the specification says the method should return a boolean indicating whether a condition on the fields is true, the return statement must use the fields in the condition.

    Earns the point: A method specified to return whether the count exceeds a threshold: writing public boolean isLarge(int threshold) with return count > threshold. The method accesses the instance variable count, compares it to the parameter, and returns the boolean result of the comparison.

    Loses the point: Writing return label.length() > threshold instead of return count > threshold because the student confused which field to use, or writing if (count > threshold) { return true; } without an else branch that returns false, leaving the method without a return on the else path and causing a compile error that obscures intent.

Across all four parts the pattern is the same: the Java syntax required is not advanced, but each rubric point demands one specific structural element that students under time pressure omit or misplace. Fields must be class level, not local. Constructors must assign to fields, not to local variables. Accessors must return the field, not print it. Behavioral methods must use the fields, not constants. Practicing Class Design FRQs against the scoring guideline reveals these structural demands and trains you to write each element automatically. The students who earn 8 or 9 points on this FRQ type are not writing more complex Java than the students who earn 4 or 5 points. They are writing the same Java with all required structural elements present.

Common AP Computer Science A FRQ mistakes

  1. 01

    Using == instead of.equals() to compare String values

    On any FRQ that involves comparing String objects, students who write if (str1 == str2) are testing whether the two variables point to the same object in memory, not whether their character sequences are equal. Because Java strings are objects, == almost always returns false even when the strings contain identical characters. The correct comparison is str1.equals(str2) or str1.equalsIgnoreCase(str2) when case should be ignored. Chief Reader Reports from 2019 through 2022 consistently identify this as a recurring error on FRQs involving String parameters or String instance variables. The Java Quick Reference sheet provided during the exam lists the equals method signature, reinforcing that equals is the intended comparison mechanism.

    AP Computer Science A Chief Reader Reports 2019 to 2022, String comparison sections

  2. 02

    Off by one errors in array and ArrayList loop bounds

    The most frequently documented execution error across all four FRQ types is a loop that starts at index 1 instead of 0, or that runs while the index is less than or equal to the array length instead of strictly less than the length. A loop written as for (int i = 1; i < arr.length; i++) misses the element at index 0. A loop written as for (int i = 0; i <= arr.length; i++) throws an ArrayIndexOutOfBoundsException on the final iteration. Chief Reader Reports from 2019 through 2022 flag this error on both the Array or ArrayList FRQ and the 2D Array FRQ. The loop bounds point on these questions is specifically targeted at confirming that all elements are processed without overrunning the array.

    AP Computer Science A Chief Reader Reports 2019 to 2022, array traversal sections

  3. 03

    Declaring instance variables inside the constructor instead of as class fields

    On Class Design FRQs, students frequently write the variable declarations inside the constructor body rather than at the class level. A declaration written as int count = 0 inside the constructor creates a local variable that exists only for the lifetime of the constructor call. Other methods in the class cannot access it, and it does not persist between method calls. The Class Design rubric always awards a specific point for declaring instance variables as private fields at the class level, and that point is not earned when declarations appear inside the constructor. This error is documented in Chief Reader Reports as one of the most consistent sources of point loss on the Class Design question.

    AP Computer Science A Chief Reader Reports 2019 to 2022, Class Design question commentary

  4. 04

    Confusing row and column index order in 2D array access

    In Java, a two dimensional array declared as int[][] grid is indexed as grid[row][col]: the first subscript selects the row and the second selects the column. Chief Reader Reports consistently identify students who reverse this order, writing grid[col][row] or constructing nested loops with the column variable as the outer loop and the row variable as the inner loop. When the 2D array is square, this reversal may not cause a visible error in output, but it fails the rubric point that requires correct row major or column major traversal. When the array is rectangular (more rows than columns or vice versa), the reversed indexing throws an ArrayIndexOutOfBoundsException. The 2D Array FRQ has one of the lowest mean scores of the four types, and index confusion is the primary reason documented in recent Chief Reader Reports.

    AP Computer Science A Chief Reader Reports 2019 to 2022, 2D Array question commentary

  5. 05

    Writing a method with the wrong return type or omitting the return statement

    Every method in Java that is not void must have a return statement that returns a value of the declared return type. On FRQs that ask students to write a method returning an int, double, boolean, or object, responses that declare the method as void, that return a value of the wrong type, or that reach the end of the method without a return statement on every execution path lose the return type rubric point. A particularly common failure is writing an if block that returns a value for one condition but omitting the else branch that returns a value for the other condition, leaving a path where the method falls off the end without returning. Chief Reader Reports note this pattern on both the Methods and Control Structures and Class Design FRQs.

    AP Computer Science A Chief Reader Reports 2019 to 2022, method return type sections

  6. 06

    Failing to call super() correctly in subclass constructors

    When a Class Design FRQ involves writing a subclass that extends an existing superclass, the subclass constructor must call the superclass constructor using super() with the correct arguments as its first statement. Students who omit the super() call, call it with wrong argument types, or place it after other statements in the constructor body produce code that either fails to compile or initializes the superclass fields incorrectly. Chief Reader Reports note that students who understand accessor and mutator methods well still lose the constructor point on inheritance questions by omitting or misusing super(). The Java Quick Reference sheet does not list constructor signatures for the superclass in the question context, so students must read the provided class description carefully to determine the correct super() arguments.

    AP Computer Science A Chief Reader Reports 2019 to 2022, inheritance and Class Design sections

How to practice AP Computer Science A FRQs effectively

Timed coding reps with a blank editor, then scoring yourself against the official rubric point by point.

The highest return practice for AP CS A FRQs is working released questions under realistic conditions: a text editor with no autocomplete or error highlighting, a strict 22 minute per question limit (90 minutes divided by 4), and no reference material other than the Java Quick Reference sheet. After completing a question, open that year's official scoring guideline, which is linked from this page for every available year, and check each rubric point one by one. Mark every point you missed and write down the specific Java element that was wrong or absent: the loop bound, the return type, the field declaration location, the comparison operator. After three or four practice cycles, your error pattern becomes clear and almost always traces to one of the six documented errors above, not to a gap in Java knowledge. The scoring guidelines include sample student responses at different score levels, which show precisely how much Java an 8 of 9 response writes versus a 4 of 9 response. Those comparisons are the most efficient calibration tool available before exam day.

  1. 1

    Read all four questions before writing. Identify which FRQ type each question is, then start with the type you are most confident in. You may complete the four questions in any order, and beginning with a strong answer builds momentum and banks secure points early.

  2. 2

    Write the method signature exactly as specified. Copy the return type, method name, and parameter types directly from the question. A method signature with the wrong return type or wrong parameter type loses the signature point even when the body is correct.

  3. 3

    When writing a Class Design FRQ, declare instance variables at the top of the class body before writing the constructor. Fields must be class level. Declarations inside the constructor create local variables that other methods cannot access.

  4. 4

    For every method that is not void, confirm that your return statement returns the correct type. Write the return statement first, then fill in the body that produces what you are returning. This prevents the common error of reaching the end of a method without a return on every path.

  5. 5

    Use.equals() for all String comparisons, never ==. If you are not sure which comparison to use, the Java Quick Reference sheet lists the equals method for String. Using == on Strings will almost always produce incorrect behavior and costs the correctness point on any part that checks String equality.

  6. 6

    On array and ArrayList FRQs, write your loop bounds carefully: start at 0 and use strictly less than the length, not less than or equal. After writing the loop, trace through it mentally with a small example array of 3 elements to verify that your loop processes index 0, index 1, and index 2 and stops before going out of bounds.

  7. 7

    On 2D Array FRQs, write out grid[row][col] as a comment before coding, then build your nested loops so the outer loop iterates over rows and the inner loop iterates over columns. Explicitly label your loop variables row and col rather than i and j to avoid confusion when writing the array access inside the loop body.

  8. 8

    Attempt every part of every question. There is no penalty for an incorrect attempt, and a partially correct implementation earns the rubric points it satisfies even if other parts are wrong. A blank method body earns zero; a method body with the right loop structure but the wrong condition still earns the loop structure point.

AP Computer Science A FRQ FAQ

How many FRQs are on the AP Computer Science A exam?

Four. Section II of the AP Computer Science A exam contains four free response questions in 90 minutes, each worth approximately 9 points for a 36 point section total. The section accounts for 50 percent of the AP score. All four questions require students to write Java code. The four question types are Methods and Control Structures, Class Design, Array or ArrayList, and 2D Array.

What are the 4 AP Computer Science A FRQ types?

Methods and Control Structures: write methods using conditionals, loops, and control flow. Class Design: write a complete class with private fields, a constructor, and accessor or behavioral methods. Array or ArrayList: implement methods that manipulate a one dimensional array or ArrayList. 2D Array: traverse and process a two dimensional array using nested loops. Each type appears once per exam, worth approximately 9 points. The order the types appear in changes from year to year.

Do you write code on the AP Computer Science A FRQs?

Yes. Every AP Computer Science A FRQ requires you to write syntactically correct Java code. This is unlike most other AP exams where you write prose or solve math problems. You implement the body of specified methods, write complete classes, or fill in missing code within a provided program context. College Board provides a Java Quick Reference sheet listing key method signatures for String, Integer, Double, List, and ArrayList, but no calculator is permitted.

How are AP Computer Science A FRQs graded?

Each FRQ has an analytic scoring rubric with approximately 9 points. Trained College Board Readers award each point when a specific Java element is correct: the loop bounds, the conditional logic, the return type and statement, the field declarations, or the method calls. Partial credit accumulates point by point. A response that writes the correct algorithm with a minor syntax error earns most available points. There is no penalty for an incorrect attempt, so students should write something for every part.

What is the most common AP Computer Science A FRQ mistake?

Off by one errors in loop bounds and using == instead of.equals() for String comparison are the two most consistently documented errors across Chief Reader Reports from 2019 through 2022. Off by one errors cause loops to miss the first or last element or throw an ArrayIndexOutOfBoundsException. Using == on Strings tests object identity, not character equality, so it almost always returns false even when the strings contain the same text.

Where can I find all released AP Computer Science A FRQs?

This page links directly to the College Board hosted FRQ booklets for 2019, 2021, 2022, and 2025 (all verified via HEAD check at the time of publication). The 2023 and 2024 booklets are available via the College Board past exam questions archive, also linked from this page. The 2020 administration used a modified digital format administered at home and did not produce a standard released booklet.

How do I use the Java Quick Reference sheet on AP CS A FRQs?

The Java Quick Reference sheet provided during the exam lists the method signatures and brief descriptions for String (length, substring, indexOf, equals, compareTo), Integer and Double wrapper class constructors and methods, and the List interface methods (size, add, get, set, remove) that ArrayList implements. Use it to confirm method names and parameter order before writing code that calls these methods. You cannot look up general Java syntax, loop structure, or class design rules. Those you must know from memory.

What is the AP Computer Science A 2D Array FRQ and why is it hard?

The 2D Array FRQ asks you to traverse and process a two dimensional array using nested loops. It is consistently identified in Chief Reader Reports as having one of the lowest mean scores of the four FRQ types. The most common error is confusing row and column index order: in Java, grid[row][col] means the first subscript is the row and the second is the column. Students who reverse this order produce code that accesses wrong elements or throws an ArrayIndexOutOfBoundsException on arrays that have different numbers of rows and columns.

How should I time the AP Computer Science A FRQ section?

With 90 minutes for four questions, plan roughly 22 minutes per question. You may work the four questions in any order. Read all four before starting so you can begin with the type you know best and bank secure points before moving to harder questions. Leave the last few minutes of the section to review return statements and loop bounds, the two most common sources of single point losses.

Are older AP Computer Science A FRQs still useful for practice?

Yes. The four FRQ types (Methods and Control Structures, Class Design, Array or ArrayList, 2D Array) have been stable for many years. FRQ booklets from 2019 onward are highly representative of current question formats. Pre-2019 booklets are useful for additional practice but may reflect a slightly different question set; the 2019 to 2022 verified booklets linked from this page are the most directly applicable for current exam preparation.

How much does the AP Computer Science A free response section count toward the final score?

Exactly 50 percent. Section II (four free response questions worth approximately 36 raw points) and Section I (40 multiple choice questions worth 40 raw points) are weighted equally at 50 percent each. The raw scores from both sections are combined into a weighted composite, which College Board converts to the 1 to 5 scale through an annual standard setting process. No fixed percentage cutoff is published, but recent score distributions show approximately 26 percent of test takers earning a 5 and approximately 70 percent earning a 3 or higher.

What Java topics appear most often on AP Computer Science A FRQs?

Across recent administrations, every exam includes questions covering: array traversal with standard for loops, conditional logic with if and else and Boolean expressions, class design with private fields and constructors, and nested loop processing of 2D arrays. String manipulation using the methods on the Java Quick Reference sheet appears on most years. Inheritance and the super keyword appear when the Class Design FRQ involves a subclass. ArrayList removal and traversal appear on Array or ArrayList questions. These topics map directly to Units 3, 4, 5, 6, 7, 8, and 9 of the AP CS A Course and Exam Description.

More AP Computer Science A resources

Practicing AP Computer Science A FRQs?

An AI tutor that works Java coding FRQs with you, checks your code logic against College Board's rubric criteria, and explains each point earned or missed.

Start free with Tutorioo