AP Computer Science A Exam Guide

The AP Computer Science A exam is 3 hours: 42 multiple-choice questions in 90 minutes (55% of your score) and 4 free-response questions in 90 minutes (45%) where you write real Java. It is fully digital, and you type your code in the Bluebook editor. The course now has 4 units, and data collections (arrays, ArrayLists and 2D arrays) is the biggest. About 66–67% of students score 3 or higher, and about 25–26% earn a 5.

2027 exam: Wednesday, May 12, 2027 (afternoon session)

AP Computer Science A exam guide cover
3 hrs
90 min multiple choice + 90 min free response
42 + 4
multiple-choice + Java free-response questions
4 units
objects to data collections
66–67%
scored 3 or higher in recent years

The exam at a glance

SectionWeightTimingWhat you do
I · Multiple choice55%1 hr 30 min · 42 questionsMostly stand-alone questions, plus 1–2 small sets of 2 questions that share a code segment. You read, trace and evaluate Java code.
II · Free response45%1 hr 30 min · 4 questionsWrite Java methods, a constructor and a full class: Q1 Methods & Control Structures, Q2 Class Design, Q3 Data Analysis with ArrayList, Q4 2D Array. The same four types every year.

You type your code in Bluebook

Both sections are taken in College Board's Bluebook app. Free-response code is typed into the built-in editor (no autocomplete) and submitted automatically. The Java Quick Reference is available inside Bluebook.

The current course: 4 units, 25 FRQ points

The course is organized into 4 large units. Free-response questions total 25 points, Q1 Part B asks you to call String methods, and Q3 is about ArrayList. Inheritance is no longer in the course.

Section I

The multiple-choice section

42 questions in 90 minutes gives you a little over 2 minutes per question. Most of that time goes into tracing loops and method calls, so practice tracing on paper under a timer. Wrong answers lose no points.

Strategies that work

  • Build a trace table: one column per variable, one row per loop pass. Don't do it in your head.
  • Check the loop bounds first. < vs <= and starting at 0 vs 1 decide most answers.
  • Watch integer division: 7 / 2 is 3, not 3.5.
  • Use the Java Quick Reference to confirm method names and return types.
  • For "which code works for all cases", try an empty list, one element and a negative number.
  • Flag and move on after 3 minutes. Come back once the easy points are banked.
What the course covers

The 4 units, in plain English

Unit 115–25%

Using Objects & Methods

Variables, data types, expressions, and calling methods on objects someone else wrote.

Be ready to: Use int, double and boolean; cast and spot integer division; use %; call static and instance methods; use the Math class; create objects with new; use String methods such as substring, indexOf, equals and compareTo.

Unit 225–35%

Selection & Iteration

Making decisions and repeating work.

Be ready to: Write and simplify boolean expressions (including De Morgan's laws and short-circuiting); use if / else if; write while and for loops; nest loops; loop through Strings; build sum, min/max, count and digit-extraction algorithms.

Unit 310–18%

Class Creation

Designing your own classes: what objects store and what they can do.

Be ready to: Write a class header, private instance variables and constructors; write accessor, mutator and other methods; explain static variables and methods; reason about scope and this; pass and return object references (and spot aliasing).

Unit 430–40%

Data Collections

Storing and processing lots of data. The biggest unit and the heart of the exam.

Be ready to: Create and traverse arrays, ArrayLists and 2D arrays (row-major and column-major); use wrapper classes; read data from text files; trace linear and binary search; trace selection, insertion and merge sort; trace recursive methods; discuss data privacy and bias.

Units 2 and 4 together are well over half of the multiple-choice section: loops, arrays, ArrayLists and 2D arrays are where most points live. Unit 3 is the smallest slice there, but it gets a whole free-response question. Using old review books? Skip the inheritance chapters.

Section II

The 4 free-response questions

90 minutes, 4 questions, 25 raw points (45% of your score). The question types never change, and every question tests your ability to write working Java code.

Q1 · 7 pts

Methods & Control Structures

Write two methods (or a constructor and a method) for a class you're given. Part A needs loops or if statements plus calls to the class's own methods; Part B needs String methods.

Practice substring boundaries, indexOf returning -1, and building a String in a loop.

Q2 · 7 pts

Class Design

Write a complete class from a description and a table of example calls: header, instance variables, constructor and the required methods.

Turn the example table into instance variables and exact method headers.

Q3 · 5 pts

Data Analysis with ArrayList

Write one method that uses, analyzes or changes data stored in an ArrayList, usually a list of objects you access through getter methods.

Know get, size, add and remove, and how to remove safely while looping.

Q4 · 6 pts

2D Array

Write one method that uses, analyzes or changes data in a 2D array, such as finding a row or column that meets a condition, or counting neighbors.

grid.length is the rows; grid[0].length is the columns.

Time plan: Skim for 3 minutes, then about 20 minutes per question, leaving 6 minutes to check. Rubric points are given for individual correct pieces (the loop, the condition, the return), so a half-finished method can still earn most of the points.

Habits that earn points

  1. Read the examples table before writing anything.
  2. Use methods the question gives you. Don't rewrite them.
  3. Trace your code with one example from the question.
  4. No imports, comments or main needed.
  5. Stuck? Write the header and the loop anyway.
Learn from others

10 traps that cost points

  1. Integer division

    7 / 2 is 3. Cast first if you need a decimal: (double) 7 / 2 is 3.5.

  2. Comparing Strings with ==

    == checks whether two references point to the same object. Use s1.equals(s2) for content.

  3. Looping one step too far

    i <= arr.length crashes with an ArrayIndexOutOfBoundsException. The last index is length - 1.

  4. Removing while looping forward

    After list.remove(i), everything shifts left and the next item is skipped. Loop backwards instead.

  5. length, length() or size()?

    Arrays: arr.length. Strings: s.length(). ArrayLists: list.size().

  6. substring's end is exclusive

    "HELLO".substring(1, 3) is "EL": it stops before index 3.

  7. Rows and columns swapped

    grid.length is the number of rows; grid[0].length is the number of columns.

  8. Redeclaring in the constructor

    int count = start; makes a new local variable. Write count = start;.

  9. Printing instead of returning

    If the method's header says int or boolean, it must return a value on every path.

  10. Leaving a free-response blank

    Points are given for each correct piece. A header plus a sensible loop can still score.

Plan your year

A study roadmap to May

A steady plan beats a last-minute rush. Shift the months to match your teacher's pacing.

  1. Sep – Nov

    Units 1–2: foundations

    Types, casting, String methods, if statements, while and for loops. Trace 5 short code snippets a week and write one small program each weekend.

  2. Dec – Jan

    Unit 3: build classes

    Write classes with constructors, getters and methods. Do one Class Design and one Methods & Control Structures question every week.

  3. Feb – Mar

    Unit 4: data collections

    Arrays, ArrayLists, 2D arrays, searching, sorting and recursion. Add ArrayList and 2D array free-response practice as you finish each topic.

  4. April

    Timed practice in Bluebook

    Open the Bluebook test preview. Take one full multiple-choice set and one full free-response set under real timing, and log every mistake by unit.

  5. Early May

    Fix weak spots

    Redo every question you missed. Review the Java traps and the Quick Reference methods.

  6. May 2027

    Exam day

    Wednesday, May 12, 2027 (afternoon session). Sleep well and confirm your start time with your AP coordinator.

Test yourself

3 practice questions

Original questions written by ACT SAT GO in the style of the exam. The free PDF has 10, with full explanations.

  1. Unit 1 · String methods

    String s = "PROGRAMMING"; What does System.out.println(s.substring(3, 7) + s.indexOf("M")); print?

    • A GRAMM6
    • B GRAM6
    • C GRAM7
    • D OGRA6
    Show answer

    Answer: B · GRAM6. Indexes start at 0. substring(3, 7) takes indexes 3–6, "GRAM" (index 7 is excluded). The first "M" is at index 6.

  2. Unit 2 · Boolean logic

    Which expression is equivalent to !(x > 5 || y <= 2) for all integers x and y?

    • A x <= 5 || y > 2
    • B x < 5 && y > 2
    • C x > 5 && y <= 2
    • D x <= 5 && y > 2
    Show answer

    Answer: D. De Morgan's law: !(A || B) becomes !A && !B. The opposite of x > 5 is x <= 5, and the opposite of y <= 2 is y > 2.

  3. Unit 4 · Sorting

    The array {5, 2, 9, 1, 7} is sorted into ascending order using selection sort. What does it look like after the first two passes of the outer loop?

    • A {1, 2, 9, 5, 7}
    • B {1, 2, 5, 9, 7}
    • C {2, 5, 9, 1, 7}
    • D {1, 2, 5, 7, 9}
    Show answer

    Answer: A. Pass 1: the smallest value 1 swaps with 5, giving {1, 2, 9, 5, 7}. Pass 2: the smallest remaining value 2 is already in place, so nothing changes. Choice C is what insertion sort gives after two passes.

Know the target

How students score

66–67%earned a 3 or higher in recent years
25–26%earned the top score of 5
3+is the score many colleges accept for credit or placement

Ranges reflect recent College Board score distributions and shift a little each year. Credit and placement policies vary by college.

FREE · 1-ON-1 · ONLINE

Aiming for a 5 in AP Computer Science A?

Book a free diagnostic session. We'll find your weakest units, review your practice responses and give you a week-by-week plan to exam day.

AP Computer Science A FAQs

When is the AP Computer Science A exam in 2027?

Wednesday, May 12, 2027 (afternoon session). Morning sessions start at 8 a.m. and afternoon sessions at 12 p.m. local time; confirm your exact start time with your school's AP coordinator.

How long is the AP Computer Science A exam?

3 hours. Multiple choice: 1 hr 30 min · 42 questions, 55% of the score; Free response: 1 hr 30 min · 4 questions, 45% of the score.

What percent of students pass AP Computer Science A?

In recent years, 66–67% of students earned a 3 or higher and 25–26% earned a 5. Many colleges accept a 3 or higher for credit or placement, but policies vary, so check each college's AP policy.

Is inheritance still on the AP Computer Science A exam?

No. The current 4-unit course no longer includes inheritance (superclasses, subclasses, super and polymorphism). Spend that study time on ArrayList and 2D array practice instead.

Do you write code by hand on the AP CSA exam?

No. The exam is fully digital: you type your Java free-response answers into the Bluebook app's built-in editor, which has no autocomplete. Practice in the Bluebook test preview before May.

Still have a question? Talk to an advisor.

More AP exam guides