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%).
📄 Table of Contents
💻 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:
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
}
}
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:
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)
}
}
-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:
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());
}
}
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.
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
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
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
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
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.
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)
int indexOf(String str), which call is correct?
❓ Frequently Asked Questions
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.
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.
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.
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.
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.
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
🔗 Related Topics
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.
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
Prefer email? Reach me directly at [email protected]