AP CSA Foundations
Build the complete Java foundation for AP Computer Science A: syntax, types, control flow, methods, strings, classes and objects, arrays, ArrayList, 2D arrays, recursion, testing and debugging, and the reading-and-writing habits the exam's four free-response types reward. Aligned to the revised (Fall 2025) AP CSA framework.
Who this course is for
Students preparing for AP Computer Science A, including complete beginners and programmers from other languages who are new to Java. No prior Java assumed; Algebra 1 comfort is enough.
What you will be able to do
- Read and trace unfamiliar Java programs, predicting output and state
- Write methods from prose specifications, honoring preconditions and postconditions
- Design classes with private fields, constructors, accessors, and behavior methods
- Use arrays, ArrayList, and 2D arrays with correct traversal and mutation discipline
- Implement searching, sorting, and accumulation algorithms and reason about their cost
- Apply recursion with correct base cases and progress
- Classify and debug compile-time, runtime, and logical errors systematically
- Recognize the exam's recurring patterns: accumulator, state machine, select-transform
Java Program Anatomy
Classes, the main method, print and println, compiling and running, and the two kinds of errors you will meet.
Variables and Data Types
int, double, boolean, char; assignment, constants, integer division, casting, and overflow.
Expressions and Operators
Arithmetic, relational and logical operators, precedence, increment, compound assignment, and short-circuit guards.
Selection and Iteration I: Conditionals
if / else / else-if chains, nesting and dangling else, boundary ownership, classification and validation patterns.
Selection and Iteration II: Loops
while and for, counting loop iterations, accumulators and counters, sentinels, nested loops and their cost.
Methods
Parameters, return values, void, local scope, static helpers, pass-by-value, decomposition, and spec contracts.
Strings
The exam's String method set, immutability, == vs equals, traversal patterns, and FRQ-style string methods.
Classes and Objects
Fields, constructors, accessors, private state, this, aliasing vs copying, and the FRQ Class-Design checklist.
Arrays
Declaration and traversal, length vs indexes, accumulation, linear search, shifting, copying and swapping.
ArrayList
Generics and autoboxing, the exam method set, safe removal patterns, and FRQ-style list analysis.
Searching and Sorting
Linear vs binary search, the sorted-array invariant, selection and insertion sort with hand traces.
Object-Oriented Design
Composition, multi-class programs, toString/constructor conventions, spec-to-code translation.
Inheritance
extends, super, constructor chaining, overriding, and which method actually runs.
Recursion
Base cases, progress, call-stack traces, string and array recursion shapes.
2D Arrays
Grids of rows and columns: nested traversal, per-row aggregation, and coordinate search.
Testing and Debugging
Error classes, boundary test design, trace tables, and a systematic debugging loop.
Algorithmic Reasoning
Iteration counting, complexity classes O(n) and O(n squared), and matching algorithms to data guarantees.
FRQ Foundations
Reading specifications: preconditions, postconditions, writing methods from prose, and extending provided classes.
Integrated Problems
Mixed-unit synthesis: select-transform pipelines, object state machines, and array-list conversion traps.
AP CSA Readiness
The capstone: a synthesis checkpoint across all four units, plus a reading exam and a readiness self-assessment.