AP CSA CED Explained
What’s Actually on the AP CSA Exam: Every Topic, Explained (2025–2026)
Last reviewed: March 2026 — reflects the official College Board 2025–2026 AP CSA Course and Exam Description (CED).The College Board publishes a Course and Exam Description (CED) for AP Computer Science A. It is 200+ pages of academic language that is genuinely difficult to parse. This page translates every section into plain English — what it actually means, what the exam asks about it, and what trap most students fall into.
Use this as your master checklist. Every topic listed here is fair game for the 42 MCQ questions or one of the 4 FRQs on May 15, 2026. Topics marked as removed are on older practice materials but will not appear on this year’s exam.
The curriculum was restructured for 2025–2026. The following were removed entirely: inheritance, polymorphism, the extends keyword, the super keyword, interfaces, and writing recursive methods. These appear in older textbooks — skip those sections.
Three topics were added or expanded: File and Scanner text file reading (4.14), working with data sets (4.15), and recursion tracing (4.16 — you trace recursive calls, you do NOT write recursive methods).
Unit 1: Using Objects and Methods
15–25% of exam — foundations, objects, Strings, Math classUnit 1 establishes the vocabulary for the entire course. Every other unit assumes you know how to create objects, call methods, and work with Strings. Weak Unit 1 knowledge shows up across all unit questions.
Why Programming? Why Java?
In plain English: Java is a compiled, object-oriented language. Programs are instructions a computer executes. You need to know the difference between compile-time and runtime errors.
Exam tests: Occasionally appears in MCQ stems asking about compile-time vs. runtime errors. Knowing the difference matters.
⚠ Trap:Compile errors prevent the program from running. Runtime errors happen while running. A logic error runs but produces wrong output. The exam distinguishes all three.
Variables and Data Types
In plain English: Three primitive types: int (whole numbers), double (decimals), boolean (true/false). Variables store values of one specific type.
Exam tests: Declaring and initializing variables, identifying the type of an expression, understanding default values.
⚠ Trap:You cannot store a double result in an int without an explicit cast. int x = 3.7; is a compile error.
Expressions and Assignment
In plain English: Arithmetic: +, -, *, /, %. Integer division truncates toward zero. % returns the remainder.
Exam tests: Evaluating expressions with mixed types, tracing assignment statements, integer division results.
⚠ Trap:5/2 is 2, not 2.5. To get a decimal: 5.0/2 gives 2.5.
Compound Assignment
In plain English: Shorthand: +=, -=, *=, /=, %=. Also ++ and --.
Exam tests: Tracing code that uses compound assignment, predicting variable values after several operations.
⚠ Trap:x += 3 is exactly x = x + 3. If x = 5, then x /= 2 makes x = 2, not 2.5.
Casting and Ranges
In plain English: Casting converts between types. (int) truncates toward zero. Integer overflow wraps around silently.
Exam tests: Predicting the result of a cast, identifying overflow, mixing int and double.
⚠ Trap:(int)(-2.9) is -2, NOT -3. Casting to int always truncates toward zero.
Objects and Classes
In plain English: A class is a blueprint. An object is an instance. Creating requires the new keyword. A reference variable stores the memory address, not the object itself.
Exam tests: Identifying when objects are created, understanding null, tracing object creation code.
⚠ Trap:Calling a method on a null reference throws a NullPointerException. Always check the object was created with new.
Methods: Void
In plain English: Void methods perform an action and return nothing. Called with dot notation: object.method(args).
Exam tests: Tracing method calls, identifying void vs. return methods, knowing void methods cannot be assigned to a variable.
⚠ Trap:A void method call cannot be used as part of an expression. int x = System.out.println("hi"); is a compile error.
Methods: Return Values
In plain English: Return methods give back a value of a specific type. The returned value must be used or it is wasted.
Exam tests: Reading method signatures, tracing chains of method calls, identifying when a returned value is discarded.
⚠ Trap:Calling a return method without using the result compiles fine but wastes the value. str.length(); alone does nothing.
Strings: Concatenation
In plain English: The + operator joins Strings. When one operand is a String, the other is converted automatically. Evaluation goes left to right.
Exam tests: Predicting the output of concatenation expressions, especially with mixed int and String operands.
⚠ Trap:1 + 2 + "hi" gives "3hi" but "hi" + 1 + 2 gives "hi12". Order matters.
Strings: Methods
In plain English: Key: length(), substring(int,int), substring(int), indexOf(String). Strings are immutable — methods return new Strings.
Exam tests: Tracing substring calls, using indexOf, building new Strings through method chains.
⚠ Trap:substring(1,4) includes indices 1, 2, 3 — the end index is EXCLUSIVE. "hello".substring(1,4) returns "ell".
Strings: Comparison
In plain English: .equals() compares content. == compares references. compareTo() returns negative, 0, or positive.
Exam tests: Distinguishing equals() vs. ==, predicting compareTo() results, tracing String conditional logic.
⚠ Trap:Using == to compare Strings is the #1 AP exam trap. It tests identity, not content. Always use .equals().
Wrapper Classes
In plain English: Integer and Double wrap primitives as objects. Required for ArrayList. Autoboxing converts automatically. Integer.parseInt() and Double.parseDouble() convert text to numbers.
Exam tests: Using parseInt and parseDouble, understanding autoboxing, knowing MIN_VALUE and MAX_VALUE.
⚠ Trap:Integer.MIN_VALUE is the most negative int. Subtracting 1 causes overflow. Both constants are on the 2026 Quick Reference.
The Math Class
In plain English: All Math methods are static: Math.abs(), Math.pow(), Math.sqrt(), Math.random().
Exam tests: Evaluating Math expressions, writing the random integer formula, understanding Math.random() returns [0.0, 1.0).
⚠ Trap:Random int formula: (int)(Math.random() * range) + min. For 1–6: (int)(Math.random() * 6) + 1. Forgetting +1 gives 0–5.
Full reference: Unit 1 Complete Study Guide
Unit 2: Selection and Iteration
25–35% of exam — the heaviest unit — conditionals, loops, algorithmsUnit 2 carries the most exam weight. Loop tracing and boolean logic appear in nearly every MCQ section and are foundational to all four FRQ types. If you have limited time, prioritize this unit.
Boolean Expressions
In plain English: Relational operators produce boolean: <, >, <=, >=, ==, !=.
Exam tests: Evaluating relational expressions, chaining comparisons, using boolean variables as flags.
⚠ Trap:== is correct for primitives. It is wrong for objects including Strings.
If Statements
In plain English: An if executes a block only when true. Without an else, nothing happens when false.
Exam tests: Tracing if statements with various inputs, identifying when a block executes vs. is skipped.
⚠ Trap:A missing else means nothing happens for the false case. This is valid — not a bug.
If-Else Statements
In plain English: Exactly one branch executes: if true the if-block runs, if false the else-block runs.
Exam tests: Predicting which branch executes, tracing through nested if-else blocks.
⚠ Trap:The else-block only runs when the if condition is false. Never both, never neither.
Else-If Chains
In plain English: Multiple conditions checked in order. The FIRST true condition wins — all remaining branches are skipped.
Exam tests: Tracing else-if chains with overlapping conditions, predicting output when multiple conditions could apply.
⚠ Trap:Order matters. If condition A and B both apply, whichever appears first wins. A broad condition before a narrow one is a common trap.
Compound Boolean Expressions
In plain English: && (AND): both true. || (OR): at least one true. ! (NOT): flips value. Short-circuit stops early.
Exam tests: Evaluating compound conditions, tracing short-circuit behavior, combining multiple conditions.
⚠ Trap:str != null && str.length() > 0 is safe because if str is null, && stops before calling length(). Reversing the order could crash.
Equivalent Boolean Expressions
In plain English: De Morgan’s: !(a && b) = !a || !b. !(a || b) = !a && !b.
Exam tests: Applying De Morgan’s Laws, simplifying negated compound expressions, identifying equivalent conditions.
⚠ Trap:When negating a compound expression, the operator flips: && becomes || and vice versa. You must flip both the operator AND negate both operands.
Comparing Objects
In plain English: == on objects checks if two variables point to the same object. .equals() checks content.
Exam tests: Distinguishing == vs. equals() for objects, tracing String comparison code.
⚠ Trap:Two String variables with the same content created separately will NOT be == true, but will be .equals() true.
While Loops
In plain English: Checks condition BEFORE each iteration. If it starts false, the body never executes. The body must eventually make the condition false.
Exam tests: Tracing while loops, counting iterations, identifying infinite loops, predicting final variable values.
⚠ Trap:An infinite loop occurs when the condition never becomes false. Watch for loops that modify the wrong variable.
For Loops
In plain English: Combines init, condition check, and update in one line. Condition checked before each iteration.
Exam tests: Counting iterations, tracing loop variable values, converting between for and while.
⚠ Trap:Off-by-one: for(int i=0; i<=10; i++) runs 11 times. Using <= instead of < adds one extra iteration.
Loop Algorithms
In plain English: Three classic patterns: accumulator (running total), counter (count matches), find max/min.
Exam tests: Implementing these patterns, tracing them in unfamiliar contexts.
⚠ Trap:Never initialize max to 0 if data could be negative. Initialize to the first element: int max = arr[0]; then loop from index 1.
String Traversal
In plain English: Visit each character using a for loop. Use substring(i, i+1) to get character at position i. Loop from 0 to length()-1.
Exam tests: Processing each character: counting, building new Strings, searching for a pattern.
⚠ Trap:The 2026 Quick Reference does NOT include charAt(). Use substring(i, i+1) instead.
Nested Loops
In plain English: A loop inside a loop. Inner loop completes all iterations for each outer iteration. Total = outer × inner.
Exam tests: Counting total iterations, tracing nested loop output, writing nested loops for 2D patterns.
⚠ Trap:For every 1 outer iteration, the inner loop runs completely. 3 outer × 4 inner = 12 total iterations.
Informal Code Analysis
In plain English: Reading and tracing code to predict output, identify errors, or determine what a method does.
Exam tests: Identifying compile/runtime/logic errors, tracing complex code fragments, predicting output.
⚠ Trap:Read the code before looking at choices. Form your own prediction first, then eliminate choices that don’t match.
Full reference: Unit 2 Complete Study Guide
Unit 3: Class Creation
10–18% of exam — writing classes, OOP, and FRQ #2Unit 3 is the class-writing unit. FRQ #2 always asks you to write a complete class from scratch. Sections 3.1–3.11 are fully tested. Sections 3.12–3.16 (inheritance) are removed from the 2025–2026 exam.
Anatomy of a Class
In plain English: A class has instance variables, constructors, and methods. Instance variables belong to each object and persist for its lifetime.
Exam tests: Identifying where instance variables are declared, distinguishing from local variables, reading class definitions.
⚠ Trap:Instance variables without initialization get defaults: 0, false, or null. Local variables have no default — using them uninitialized is a compile error.
Constructors
In plain English: Constructors initialize an object when created with new. Same name as the class, NO return type — not even void.
Exam tests: Writing constructors, tracing object creation, overloaded constructors.
⚠ Trap:public void Dog() is NOT a constructor. public Dog() is. The void makes it a regular method.
Documentation
In plain English: // for single-line, /* */ multi-line, /** */ for Javadoc. Javadoc appears before methods.
Exam tests: Identifying comment types, reading Javadoc-style headers the FRQ provides.
⚠ Trap:FRQ prompts come with Javadoc-style comments. Read them — they describe exactly what your method must do.
Accessor Methods
In plain English: Getters return the value of an instance variable. Return type matches the variable type.
Exam tests: Writing getters, identifying accessors in a class, calling getters from outside.
⚠ Trap:An accessor must have a return statement. Forgetting return is a compile error.
Mutator Methods
In plain English: Setters modify an instance variable. They are void and accept a parameter with the new value.
Exam tests: Writing setters, tracing code that calls setters in sequence.
⚠ Trap:A setter returns void. public void setAge(int age) is correct.
Writing Methods
In plain English: Methods have a signature (name + params), a return type (or void), and a body. Parameters are local to the method.
Exam tests: Writing methods with various return types, tracing parameter passing.
⚠ Trap:Parameters are COPIES of values passed in for primitives. Changing a parameter inside the method does not affect the original.
Static Variables
In plain English: Static variables belong to the class, shared by all instances. All objects see the same static value.
Exam tests: Tracing code with static variables, predicting changes as multiple objects are created.
⚠ Trap:Incrementing a static counter in the constructor counts how many objects exist. Classic exam pattern.
Static Methods
In plain English: Called with ClassName.method(). Cannot access instance variables or use this.
Exam tests: Identifying when a static method tries to access instance data (compile error), calling static methods correctly.
⚠ Trap:A static method cannot call an instance method directly. Static methods exist before any objects are created.
Scope and Access
In plain English: A variable’s scope is where it can be used. Local variables exist only in their block. private data is only accessible inside the class.
Exam tests: Identifying where variables are in scope, predicting compile errors from scope violations.
⚠ Trap:Instance variables should always be private on FRQ #2. Declaring them public costs rubric points.
The this Keyword
In plain English: this refers to the current object. Used to disambiguate when a parameter has the same name as an instance variable.
Exam tests: Reading constructors and setters that use this, writing constructors where parameter names match field names.
⚠ Trap:Without this, name = name; assigns the parameter to itself. Always use this.varName when names collide.
Ethical and Social Implications
In plain English: Responsible computing: privacy, intellectual property, data security, algorithmic bias.
Exam tests: Short conceptual questions about privacy, fairness, and software developer responsibilities.
⚠ Trap:These are 1–2 questions per exam. They cannot be practiced by coding.
Inheritance Basics — NOT ON 2025–2026 EXAM
In plain English: REMOVED. Subclasses, superclasses, extends keyword.
Exam tests: Not tested on the 2025-2026 exam.
⚠ Trap:Skip entirely.
Overriding Methods — NOT ON 2025–2026 EXAM
In plain English: REMOVED. @Override, polymorphism.
Exam tests: Not tested on the 2025-2026 exam.
⚠ Trap:Skip entirely.
The super Keyword — NOT ON 2025–2026 EXAM
In plain English: REMOVED. Calling parent constructors and methods.
Exam tests: Not tested on the 2025-2026 exam.
⚠ Trap:Skip entirely.
Creating References — NOT ON 2025–2026 EXAM
In plain English: REMOVED. Polymorphic assignment.
Exam tests: Not tested on the 2025-2026 exam.
⚠ Trap:Skip entirely.
Object Superclass — NOT ON 2025–2026 EXAM
In plain English: REMOVED. toString() and equals() from Object via inheritance.
Exam tests: Not tested on the 2025-2026 exam.
⚠ Trap:Skip entirely.
Note on toString(): Even though 3.16 is removed, writing a toString() may still be explicitly requested in FRQ #2. If the prompt asks for it, write it as a regular method.
Full reference: Unit 3 Complete Study Guide
Unit 4: Data Collections
30–40% of exam — arrays, ArrayList, 2D arrays, sorting, searching — plus 3 new sectionsThe largest unit by exam weight. Three sections are new for 2025–2026: Scanner/File reading, data sets, and recursion tracing. FRQ #3 and FRQ #4 both come from this unit.
Array Creation
In plain English: Fixed size set at creation. int[] arr = new int[5]; or int[] arr = {1,2,3};. Size never changes.
Exam tests: Creating arrays, accessing by index, knowing defaults (0, false, null).
⚠ Trap:arr.length has NO parentheses. arr.length() is a compile error. Opposite of String.length().
Traversing Arrays
In plain English: Standard: for(int i=0; i
Exam tests: Traversing with algorithms, modifying elements, partial traversals.
⚠ Trap:Valid indices are 0 through arr.length - 1. Accessing arr[arr.length] throws ArrayIndexOutOfBoundsException.
Enhanced For Loop
In plain English: for(int val : arr). Simpler but READ-ONLY. The loop variable is a copy.
Exam tests: Identifying when enhanced for is appropriate, recognizing it cannot modify elements.
⚠ Trap:Classic trap: code uses enhanced for to modify elements, then asks what happens. Array is unchanged — the loop variable is a copy.
Array Algorithms
In plain English: Linear search, find max/min, sum/average, count matches, shift elements.
Exam tests: Implementing these in FRQ, tracing in MCQ.
⚠ Trap:Average requires a cast: (double)sum / arr.length. Without it, integer division truncates.
ArrayList Declaration
In plain English: ArrayList stores objects, not primitives. Use wrapper types: ArrayList.
Exam tests: Declaring correctly, understanding why wrapper types are required.
⚠ Trap:Using a primitive like int in angle brackets is a compile error. Always use Integer, Double, or a class name.
ArrayList Methods
In plain English: Six key methods: size(), add(obj), add(i,obj), get(i), set(i,obj), remove(i).
Exam tests: Calling methods correctly, understanding what remove returns, distinguishing add variants.
⚠ Trap:size() has parentheses. length (no parens) is arrays. length() (parens) is Strings. Mixing these up is extremely common.
Traversing ArrayLists
In plain English: Use size() instead of length and get(i) instead of arr[i].
Exam tests: Converting between array and ArrayList traversal, using the correct size method.
⚠ Trap:Do NOT use enhanced for when you plan to remove elements during traversal.
ArrayList Algorithms
In plain English: Filter (remove while traversing), build new list, find and replace. FRQ #3 is always ArrayList.
Exam tests: Remove-while-traversing, building filtered lists.
⚠ Trap:When removing during a forward loop, indices shift and you skip elements. Traverse BACKWARD: for(int i=list.size()-1; i>=0; i--).
Searching
In plain English: Linear search: check each element, works on any array. Binary search: halves range each time, requires SORTED data.
Exam tests: Writing linear search, tracing binary search steps, knowing when each applies.
⚠ Trap:Binary search on unsorted data produces WRONG results — not an error, just a wrong index. The exam will test this.
Sorting
In plain English: Selection sort: find min in unsorted region, swap to front. Insertion sort: shift sorted elements, insert in position.
Exam tests: Tracing sort steps, identifying which algorithm a code fragment implements.
⚠ Trap:Binary search requires sorted data. Selection sort always makes the same comparisons. Insertion sort is efficient on nearly-sorted data.
2D Arrays
In plain English: Array of arrays. int[][] grid = new int[rows][cols]. Access with grid[row][col]. FRQ #4 always uses 2D arrays.
Exam tests: Creating 2D arrays, accessing elements, understanding the row/column structure.
⚠ Trap:grid.length = number of ROWS. grid[0].length = number of COLUMNS. Swapping these is the most common 2D array error.
Traversing 2D Arrays
In plain English: Row-major: outer = rows, inner = cols (standard). Column-major: outer = cols, inner = rows.
Exam tests: Writing row-major and column-major traversals, predicting output from traversal order.
⚠ Trap:Check which loop variable is used for row vs. column access to determine the traversal order.
2D Array Algorithms
In plain English: Sum all elements, find max, process specific rows/cols, search for a value.
Exam tests: Implementing matrix algorithms in FRQ #4, tracing 2D array code.
⚠ Trap:Bounds errors are especially common with 2D. Check both row and column indices stay within valid ranges.
File and Scanner Reading — NEW FOR 2025–2026
In plain English: NEW. Create a File object from a filename, pass to Scanner to read. Use hasNext() to check for more data.
Exam tests: Writing file-reading loops, using Scanner methods to parse numeric and String data.
⚠ Trap:After nextInt() or nextDouble(), the newline stays in the buffer. Call nextLine() once to clear it before reading the next line.
Working with Data Sets — NEW FOR 2025–2026
In plain English: NEW. Processing collections: computing statistics, filtering, transforming. Combines array/ArrayList algorithms with real-world scenarios.
Exam tests: Applying accumulator, filter, and transform patterns to data sets.
⚠ Trap:Data set questions often require chaining multiple algorithms. Read carefully to identify all required operations.
Recursion Tracing — NEW FOR 2025–2026
In plain English: NEW. Trace recursive method calls step by step. You will NOT write recursive methods — only follow execution and predict the return value.
Exam tests: Tracing recursive calls with a call stack, identifying the base case, predicting final return value.
⚠ Trap:Never try to see the whole picture at once. Trace one call at a time: what does this call return? Substitute that value in the call above.
Full reference: Unit 4 Complete Study Guide
The 4 FRQ Types — Every Year, Same Structure
The AP CSA exam has exactly 4 FRQs. The types are fixed — the same four appear every year in the same order.
You are given a class with some code already written and asked to complete or write specific methods. Uses conditionals, loops, and String or Math methods. The most common format: write a method body given the header and a description of what it should do.
Write a complete class from scratch: instance variables, constructor(s), accessor methods, mutator methods, and any additional methods the prompt describes. All instance variables must be private. Partial implementations earn credit — write something for every part.
Manipulate a one-dimensional ArrayList. Common patterns: filter and remove elements backward, build a new list, find elements matching a condition. Key change for 2025–2026: this question uses ArrayList only. Arrays were removed from this question type.
Work with a two-dimensional array. Nested traversal is almost always required. grid.length = rows, grid[0].length = cols — get this wrong and everything else falls apart.
FRQ universal rules: Write something for every part. Copy method headers exactly. Call provided helper methods instead of rewriting them. Never use System.out.println() in a return method.
The Java Quick Reference — What’s on It and What It Means
The Quick Reference is provided on the exam. The 2026 version includes Scanner and File methods. Here is every method explained.
| Method / Constant | What It Does | Key Detail |
|---|---|---|
String.length() |
Returns number of characters | Indices run 0 to length()-1 |
String.substring(a,b) |
Returns chars from index a up to (not including) b | End index is EXCLUSIVE |
String.substring(a) |
Returns chars from index a to end | substring(0) returns the whole String |
String.indexOf(str) |
Returns first index of str, or -1 if not found | -1 means not found, not an error |
String.equals(other) |
Compares String content, returns boolean | Use this, never == for Strings |
String.compareTo(other) |
Returns negative, 0, or positive (alphabetical) | Negative = comes before, positive = comes after |
String.split(regex) |
Splits String into array of substrings (NEW 2026) | split(",") splits on commas |
Integer.parseInt(str) |
Converts String to int | Throws exception if str is not a valid integer |
Double.parseDouble(str) |
Converts String to double | NEW on 2026 Quick Reference |
Integer.MIN_VALUE |
Most negative int: -2,147,483,648 | Useful for initializing max-finding algorithms |
Integer.MAX_VALUE |
Most positive int: 2,147,483,647 | Adding 1 causes overflow |
Math.abs(x) |
Absolute value of x | Works for int and double |
Math.pow(base, exp) |
Returns base raised to exp | Returns double, cast if you need int |
Math.sqrt(x) |
Square root of x | Returns double |
Math.random() |
Random double in [0.0, 1.0) | Never returns exactly 1.0 |
ArrayList.size() |
Number of elements | Has parentheses, unlike array.length |
ArrayList.add(obj) |
Adds to end of list | Size increases by 1 |
ArrayList.add(i, obj) |
Inserts at index i, shifts right | Elements shift to higher indices |
ArrayList.get(i) |
Returns element at index i | Does not remove it |
ArrayList.set(i, obj) |
Replaces at index i, returns old element | Returns the element that was replaced |
ArrayList.remove(i) |
Removes at index i, returns it, shifts left | Size decreases by 1 |
Scanner.nextInt() |
Reads next int (NEW 2026) | Leaves newline in buffer |
Scanner.nextDouble() |
Reads next double (NEW 2026) | Same buffer issue as nextInt() |
Scanner.next() |
Reads next whitespace-delimited token (NEW 2026) | Stops at any whitespace |
Scanner.nextLine() |
Reads full line including spaces (NEW 2026) | Call once after nextInt() to clear buffer |
Scanner.hasNext() |
Returns true if more input exists (NEW 2026) | Use in while loop to read entire file |
Scanner.close() |
Closes the scanner (NEW 2026) | Always close when done |
File(pathname) |
Creates File object for given path (NEW 2026) | Pass to Scanner to read from a file |
Frequently Asked Questions
Official source: This page is based on the College Board AP CSA Course and Exam Description (PDF). Always verify against the official document for the most current information.
Where to Go From Here
- Unit 1 Study Guide — Objects, Strings, Math, primitives
- Unit 2 Study Guide — Conditionals, loops, boolean logic
- Unit 3 Study Guide — Classes, constructors, methods
- Unit 4 Study Guide — Arrays, ArrayList, 2D arrays, sorting
- Daily Practice (QOTD) — Free daily questions organized by topic
- FRQ Archive — Every released FRQ with full solutions
- AP CSA Test Builder — Build a custom practice exam from 500+ questions
- Free AP CSA Cram Sheet — Every Quick Reference method in one printable page
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]