AP CSA API Quick Reference

AP CSA Java Quick Reference Guide: How to Use It (2025-2026)

The AP CSA Java Quick Reference is the official one-page cheat sheet provided to every student during the AP Computer Science A exam, and knowing how to use it efficiently is a skill in itself. The reference lists exactly the methods you are expected to know for String, Integer, Double, Math, ArrayList, and the Object class. Understanding what IS and is NOT on the reference — and how to read the method signatures listed there — is part of effective AP exam preparation starting in Unit 1 (15–25%).

💻 Code Examples — Predict First

Before running each example, write down your prediction. This is the single most effective AP exam study technique.

🤔 Predict the output before running:

Example 1: String Methods from the Quick Reference
public class Main {
    public static void main(String[] args) {
        // Methods ON the Quick Reference (String section)
        String s = "hello";
        System.out.println(s.length());
        System.out.println(s.substring(1, 3));  // "el"
        System.out.println(s.indexOf("l"));     // 2
        System.out.println(s.charAt(0));        // 'h'
        System.out.println(s.equals("hello"));  // true
        System.out.println(s.compareTo("hi"));  // negative
    }
}
Running…

5 / el / 2 / h / true / negative — All six String methods shown are listed on the AP Quick Reference. You are expected to know their exact signatures and return types.

🤔 Predict the output before running:

Example 2: Integer Constants and Math Methods
public class Main {
    public static void main(String[] args) {
        // Integer class methods (on Quick Reference)
        System.out.println(Integer.MIN_VALUE);   // -2147483648
        System.out.println(Integer.MAX_VALUE);   //  2147483647
        
        // Math methods (on Quick Reference)
        System.out.println(Math.abs(-5));
        System.out.println(Math.pow(2, 8));
        System.out.println(Math.sqrt(25));
        System.out.println(Math.random());       // [0.0, 1.0)
    }
}
Running…

-2147483648 / 2147483647 / 5 / 256.0 / 5.0 / [0.0,1.0) — Integer.MIN_VALUE and MAX_VALUE are on the reference. Math.pow and Math.sqrt return double even when the result is whole.

🤔 Predict the output before running:

Example 3: ArrayList Methods from the Quick Reference
import java.util.ArrayList;
public class Main {
    public static void main(String[] args) {
        // ArrayList methods (on Quick Reference)
        ArrayList list = new ArrayList();
        list.add(10);               // add to end
        list.add(0, 99);            // insert at index
        list.get(1);                // retrieve
        list.set(0, 5);             // replace
        list.remove(0);             // remove by index
        System.out.println(list.size());
    }
}
Running…

1 — ArrayList methods on the reference: add(obj), add(index,obj), get(index), set(index,obj), remove(index), size(). After two adds and one remove, size = 1.

❌ Common Pitfalls

These are the mistakes students most often make on the AP CSA exam with AP CSA Java Quick Reference guide. Study them carefully.

1
⚠ Assuming everything you need is on the Quick Reference

The Quick Reference lists the most commonly tested methods, but NOT everything. Notably absent: System.out.print/println, array syntax, for loop syntax, if-else, and most operator behavior. You must memorize these.

// NOT on Quick Reference (must memorize):
// - array declaration and access syntax
// - for/while loop syntax
// - operator precedence
// - casting syntax
2
⚠ Misreading the parameter types in a method signature

The Quick Reference lists method signatures like int indexOf(String str). Students sometimes pass a char instead of a String. s.indexOf('a') passes a char; s.indexOf("a") passes a String. Only the String version is on the reference.

s.indexOf("a")  // String parameter -- on Quick Reference
s.indexOf('a')  // char parameter -- different method
3
⚠ Not knowing which class each method belongs to

The Quick Reference is organized by class. Math.random() is in the Math section. length() is in the String section. size() is in the ArrayList section. Calling list.length() or s.size() are compile errors — wrong class.

s.length()      // String.length() -- correct
list.size()     // ArrayList.size() -- correct
list.length()   // COMPILE ERROR: no such method
4
⚠ Forgetting Integer.MIN_VALUE for max-finding initialization

When finding a maximum in an array of unknown values, initialize to Integer.MIN_VALUE (on the Quick Reference) instead of 0. This handles arrays containing all negative values correctly.

int max = Integer.MIN_VALUE; // guaranteed less than any int
int max = 0;                 // fails if all values are negative
🎓 AP Exam Tip

On the AP exam, the Quick Reference is given to you — but you should not need to look at it constantly. Know the method names and parameter types from memory. Use the reference to verify an exact signature you’re unsure about, not to discover methods you’ve never seen.

⚠ Watch Out!

The Quick Reference uses the format returnType methodName(paramType paramName). The parameter NAMES shown (like str in indexOf(String str)) are not special — you can pass any String expression. Only the TYPE matters for the call to compile.

✍ Check for Understanding (8 Questions)

Your Score: 0 / 0
1. Which of the following is NOT listed on the AP CSA Java Quick Reference?
2. According to the Quick Reference signature int indexOf(String str), which call is correct?
3. What does Integer.MAX_VALUE represent?
4. Which class does the size() method belong to?
5. According to the Quick Reference, what does add(int index, E obj) do?
6. What is the return type of Math.sqrt() according to the Quick Reference?
7. Which best describes how to use the Quick Reference efficiently on the AP exam?
8. What is the correct way to initialize a max-finder for an array of unknown integer values?

❓ Frequently Asked Questions

What is the AP CSA Java Quick Reference?

The Java Quick Reference is an official one-page document provided by the College Board during the AP CSA exam. It lists the method signatures for String, Integer, Double, Math, ArrayList, and Object that students are expected to use. It is available at apcentral.collegeboard.org.

What is NOT on the AP CSA Quick Reference?

The reference does not include: System.out.print/println, array syntax, loop syntax (for/while), if-else, operator precedence, casting syntax, or basic Java keywords. These must be memorized.

How should I read a method signature on the Quick Reference?

The format is: returnType methodName(paramType paramName). For example, int indexOf(String str) means: call it on a String object, pass a String argument, and it returns an int. The parameter name (str) is just a label.

Why is Integer.MIN_VALUE useful in AP CSA?

Integer.MIN_VALUE (-2,147,483,648) is the smallest possible int value. Using it as the initial value for a max-finding variable guarantees that any actual integer in an array will be larger, making the first comparison always update max correctly.

Is the Quick Reference available during the AP CSA exam?

Yes. The College Board provides the Java Quick Reference to all students during the AP CSA exam (both paper and digital Bluebook versions). However, it only covers specific library methods — not language syntax or operators.

TC

Tanner Crow — AP CS Teacher & Tutor

11+ years teaching AP Computer Science at Blue Valley North High School (Overland Park, KS). Verified Wyzant tutor with 1,845+ hours, 451+ five-star reviews, and a 5.0 rating. His AP CSA students score 5s at more than double the national rate.

  • 54.5% of students score 5 on AP CSA (national avg: 25.5%)
  • 1,845+ verified tutoring hours • 5.0 rating
  • Free 1-on-1 tutoring inquiry: Wyzant Profile

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]