AP Computer Science A (College Board): complete guide to the units, the Java subset, the computational thinking practices and the exam
A complete guide to College Board AP Computer Science A. Covers the units (from primitive types to recursion), the computational thinking practices, the AP Java subset, how Section I (multiple choice) and Section II (free response code) work, and how to study each unit for a 5.
College Board AP Computer Science A is designed to be the equivalent of a first-semester, introductory college course in computer science for majors. It is taught entirely in Java and centers on object-oriented programming: creating and using objects, writing classes, and processing data with arrays and lists. The course is built on a set of computational thinking practices, and there is no coursework - everything is examined in the two sections of the exam, both of which involve real code. This page is the index: below is a map of the units, the exam structure, and how to study. This pilot covers Units 1 and 2 in full.
The AP Computer Science A units
The College Board organizes the content into units that build on one another, from the basics of values and objects through to recursion.
- Unit 1 Primitive Types
- Why we program and why Java, the primitive types
int,doubleandboolean, declaring and initialising variables, arithmetic expressions with operator precedence, integer division and modulo, compound assignment and increment operators, and casting with the finite range of anint. - Unit 2 Using Objects
- The class-object relationship, instantiating objects with
newand constructors, calling void and non-void methods with and without parameters, String objects and the required String methods, theIntegerandDoublewrapper classes, and theMathclass. - Unit 3 Boolean Expressions and if Statements
- Relational and logical operators,
if,if-elseand nested conditionals, compound boolean expressions, De Morgan's laws, and comparing objects. - Unit 4 Iteration
whileandforloops, nested loops, loop analysis (counting iterations and tracing), and algorithms such as finding a sum, maximum or minimum and String traversal.- Unit 5 Writing Classes
- Designing a class with attributes and methods, constructors, accessor and mutator methods, the
thiskeyword, scope and access (public,private), static variables and methods, and ethical and responsible programming. - Unit 6 Array
- Declaring and initialising arrays, accessing elements, traversing an array with
forand enhancedforloops, and standard array algorithms. - Unit 7 ArrayList
- The
ArrayListclass and its methods (add,get,set,remove,size), traversal, searching and sorting, and the privacy and ethical issues of stored data. - Unit 8 2D Array
- Declaring and initialising two-dimensional arrays, traversing them with nested loops in row-major order, and 2D array algorithms.
- Unit 9 Inheritance
- Superclasses and subclasses,
extends, overriding methods,super, polymorphism, and theObjectclass methods. - Unit 10 Recursion
- Recursive methods, tracing recursive calls, and recursive searching and sorting (binary search and merge sort).
Exam structure
The AP Computer Science A exam is 3 hours and has two equally weighted sections. A quick reference with the Java subset method signatures is provided for the free-response section.
- Section I, multiple choice - 40 questions, 1 hour 30 minutes, 50%. Mostly reading and tracing code to determine output or behavior, and identifying errors, across all units.
- Section II, free response - 4 questions, 1 hour 30 minutes, 50%. All four require you to write Java code: implementing methods and control structures, designing a class, processing arrays and ArrayLists, and a 2D array question.
The questions are written from the computational thinking practices (program design, code logic, code implementation, code testing, and documentation and ethical computing), so you must trace code precisely, write correct methods, and reason about testing and correctness.
How to study AP Computer Science A
AP CSA rewards fluent code tracing and confident, syntactically correct code writing.
- Work from the Course and Exam Description. Each topic (for example 2.7 String Methods) maps to specific learning objectives and essential knowledge statements that exam questions are written from, and to the AP Java subset.
- Trace code by hand. The single most useful skill is stepping through code statement by statement, tracking every variable. Most multiple-choice questions are tracing questions.
- Master the Java subset method signatures. Know
length,substring,indexOf,equals,compareTo, theMathmethods, the wrapper classes, and (later) theArrayListmethods cold. - Write code under time pressure. All of Section II is code writing. Practice implementing methods that compile and produce the exact required output.
- Watch the classic traps. Integer division, casting position, off-by-one in
substring, andequalsversus==recur on every exam.
The units, topic by topic
Each topic has a Course-and-Exam-Description-level answer page with worked exam questions and cross-links, plus an overview guide and quiz. Browse the set at /ap/computer-science/syllabus. This library covers Units 1 to 5 in full:
- Unit 1: why programming? why Java?, variables and data types, expressions and assignment statements, compound assignment operators, casting and ranges of variables.
- Unit 2: objects: instances of classes, creating and storing objects, calling a void method, calling a void method with parameters, calling a non-void method, String objects: concatenation, literals, and more, using String objects and methods, wrapper classes: Integer and Double, using the Math class.
- Unit 3: boolean expressions, if statements and control flow, if-else statements, else if statements, compound boolean expressions, equivalent boolean expressions, comparing objects.
- Unit 4: while loops, for loops, developing algorithms using Strings, nested iteration, informal code analysis.
- Unit 5: anatomy of a class, constructors, documentation with comments, accessor methods, mutator methods, writing methods, static variables and methods, scope and access, the this keyword, ethical and social implications of computing systems.
For the official Course and Exam Description
The College Board publishes the full Course and Exam Description, the AP Java subset appendix, released free-response questions and scoring guidelines at apcentral.collegeboard.org. Always study from the current Course and Exam Description and the College Board's own released exams, because the Java subset and question style are board-specific.
Computer Science guides
In-depth written guides with paired practice quizzes.
Computer Science practice quizzes
Multiple-choice drills with worked answer explanations. Your scores stay on this device.
The AP system, explained
See all β- generalAI and academic integrity in 2026: what you can and cannot do
An honest 2026 guide to how Year 12 students can use AI tools well and where the line is. NESA, VCAA, and QCAA rules, what AI is actually good at, what it is bad at, and how to think about it without panicking.
- uni pathwaysAP credit and placement (2026): how colleges award credit for 3s, 4s, and 5s
How U.S. colleges turn AP scores into credit and placement. What a 3, 4, or 5 typically earns, the difference between credit and advanced placement, why selective schools set higher thresholds, and how to check each college's policy before you commit.
- examsAP exam day: what to expect with digital Bluebook exams (2025-26)
A practical, ground-level guide to AP exam day in 2025-26. How digital and hybrid Bluebook exams work, what to bring, exam timing, late testing, and how score cancellation and withholding work if something goes wrong.
- generalAP vs honors vs dual enrollment: GPA weighting, admissions signaling, and when each makes sense
How AP, honors, and dual enrollment courses compare on GPA weighting, college admissions signaling, and college credit. A decision framework for which to pick in junior and senior year, and the tradeoffs students consistently get wrong.
- generalChoosing your AP courses (2026): difficulty tiers, prerequisites, and how many to take
A decision framework for picking AP courses well. Difficulty tiers across the 42 AP subjects, which courses have prerequisites, how many APs to take without burning out, and how to sequence them across junior and senior year.