Skip to main content

← AP

United States Β· College Board2026

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, double and boolean, 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 an int.
Unit 2 Using Objects
The class-object relationship, instantiating objects with new and constructors, calling void and non-void methods with and without parameters, String objects and the required String methods, the Integer and Double wrapper classes, and the Math class.
Unit 3 Boolean Expressions and if Statements
Relational and logical operators, if, if-else and nested conditionals, compound boolean expressions, De Morgan's laws, and comparing objects.
Unit 4 Iteration
while and for loops, 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 this keyword, 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 for and enhanced for loops, and standard array algorithms.
Unit 7 ArrayList
The ArrayList class 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 the Object class 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.

  1. 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.
  2. 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.
  3. Master the Java subset method signatures. Know length, substring, indexOf, equals, compareTo, the Math methods, the wrapper classes, and (later) the ArrayList methods cold.
  4. Write code under time pressure. All of Section II is code writing. Practice implementing methods that compile and produce the exact required output.
  5. Watch the classic traps. Integer division, casting position, off-by-one in substring, and equals versus == 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:

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.

See all β†’

Computer Science practice quizzes

Multiple-choice drills with worked answer explanations. Your scores stay on this device.

The AP system, explained

See all β†’

Common questions about Computer Science

How is AP Computer Science A structured?
AP Computer Science A is an introductory, object-oriented programming course taught entirely in Java. The content is organized into units that build on one another: Unit 1 Primitive Types and Unit 2 Using Objects lay the foundation, followed by Boolean Expressions and if Statements, Iteration, Writing Classes, Array, ArrayList, 2D Array, Inheritance, and Recursion. The course is built around computational thinking practices that are assessed alongside the Java content.
How is the AP Computer Science A exam scored?
The exam is 3 hours and has two sections worth 50% each. Section I is 40 multiple-choice questions in 1 hour 30 minutes, covering code analysis and tracing across all units. Section II is 4 free-response questions in 1 hour 30 minutes, all of which require you to write Java code: methods and control structures, class design, array and ArrayList processing, and a 2D array question. The composite is scaled to the 1 to 5 AP score.
What is the AP Java subset?
The AP Java subset is the restricted set of Java language features, classes and methods that the exam uses, defined in the Course and Exam Description appendix. It includes the primitive types int, double and boolean; String methods such as length, substring, indexOf, equals and compareTo; the Math methods abs, pow, sqrt and random; the Integer and Double wrapper classes; and the ArrayList methods. You are only tested on this subset, so you do not need every Java feature.
What are the computational thinking practices in AP CSA?
The Course and Exam Description defines computational thinking practices that the questions are written from: Program Design and Algorithm Development, Code Logic (determining the result of code), Code Implementation (writing program code), Code Testing (analyzing and testing code for correctness), and Documentation and Ethical Computing. Free-response questions are written from these practices, which is why every Section II question asks you to write or reason about working Java code.
How much of the exam is writing code versus reading it?
Roughly half and half. Section I (multiple choice) is mostly reading and tracing code to determine output or behavior, and identifying errors. Section II (free response) is entirely writing Java: you implement methods, design a class, and process arrays, ArrayLists and a 2D array. Strong performance needs both fluent code tracing and confident code writing, so practice both. A quick reference sheet with the Java subset method signatures is provided in Section II.
How does AP Computer Science A compare to AP Computer Science Principles?
AP Computer Science A is a rigorous, Java-based programming course equivalent to a first-semester college course for computing majors, focused on object-oriented design, data structures and algorithms. AP Computer Science Principles is broader and more conceptual, language-agnostic, and covers the wider field of computing including data, the internet and impacts, with a portfolio component. CS A is the deeper programming course; always study from the current Course and Exam Description for whichever you take.