Skip to content
All courses
CS A

AP Computer Science A

Java from first expressions to ArrayList data analysis, drilled on the real 42-question, 4-FRQ exam.

Category
Math and computer science
Units
4 units
Exam
Exam May 12, 2027 (in 227 days)
Start Unit 1 freeSign in

Unit 1 is free with an account. No card, no trial clock.

What the course covers

A college-level first course in programming with Java. You learn to call methods on objects, control flow with selection and loops, design your own classes, and process data with arrays, ArrayList, 2D arrays, and text files. Every unit trains the two things the exam rewards: tracing code exactly (what does this print, which segment works) and writing correct Java to a specification under time pressure.

4 units, with exam weights

  1. Unit 1

    Using Objects and Methods

    15-25% of examFree
    Java from the ground up: algorithms and compiling, the three primitive types (int, double, boolean), expressions with integer division and remainder, casting and overflow, then using existing classes. You call class methods like the Math methods, create objects with constructors, call instance methods, and manipulate String objects with the Quick Reference methods.
    15 topics
    1. 1.1Introduction to Algorithms, Programming, and Compilers
    2. 1.2Variables and Data Types
    3. 1.3Expressions and Output
    4. 1.4Assignment Statements and Input
    5. 1.5Casting and Range of Variables
    6. 1.6Compound Assignment Operators
    7. 1.7Application Program Interface (API) and Libraries
    8. 1.8Documentation with Comments
    9. 1.9Method Signatures
    10. 1.10Calling Class Methods
    11. 1.11Math Class
    12. 1.12Objects: Instances of Classes
    13. 1.13Object Creation and Storage (Instantiation)
    14. 1.14Calling Instance Methods
    15. 1.15String Manipulation
  2. Unit 2

    Selection and Iteration

    25-35% of exam
    The control structures that make algorithms: Boolean expressions, if, if-else, and if-else-if chains, compound conditions with short-circuit evaluation and De Morgan's laws, then while and for loops, nested loops, and the standard algorithms built from them for numbers and String objects. Ends with counting how many times a statement runs.
    12 topics
    1. 2.1Algorithms with Selection and Repetition
    2. 2.2Boolean Expressions
    3. 2.3if Statements
    4. 2.4Nested if Statements
    5. 2.5Compound Boolean Expressions
    6. 2.6Comparing Boolean Expressions
    7. 2.7while Loops
    8. 2.8for Loops
    9. 2.9Implementing Selection and Iteration Algorithms
    10. 2.10Implementing String Algorithms
    11. 2.11Nested Iteration
    12. 2.12Informal Run-Time Analysis
  3. Unit 3

    Class Creation

    10-18% of exam
    Designing and writing your own classes: abstraction and class diagrams, the social and legal impact of programs, encapsulation with private instance variables, constructors, accessor and mutator methods, passing and returning object references, static variables and methods, scope, and the this keyword. This unit is the whole of free-response Question 2.
    9 topics
    1. 3.1Abstraction and Program Design
    2. 3.2Impact of Program Design
    3. 3.3Anatomy of a Class
    4. 3.4Constructors
    5. 3.5Methods: How to Write Them
    6. 3.6Methods: Passing and Returning References of an Object
    7. 3.7Class Variables and Methods
    8. 3.8Scope and Access
    9. 3.9this Keyword
  4. Unit 4

    Data Collections

    30-40% of exam
    The heaviest unit. Ethics of data collection and working with data sets, then 1D arrays, reading data from text files, wrapper classes, ArrayList, and 2D arrays, each with its standard traversals and algorithms. Finishes with linear search, selection and insertion sort, and tracing recursion, binary search, and merge sort. Free-response Questions 3 and 4 come from this unit.
    17 topics
    1. 4.1Ethical and Social Issues Around Data Collection
    2. 4.2Introduction to Using Data Sets
    3. 4.3Array Creation and Access
    4. 4.4Array Traversals
    5. 4.5Implementing Array Algorithms
    6. 4.6Using Text Files
    7. 4.7Wrapper Classes
    8. 4.8ArrayList Methods
    9. 4.9ArrayList Traversals
    10. 4.10Implementing ArrayList Algorithms
    11. 4.112D Array Creation and Access
    12. 4.122D Array Traversals
    13. 4.13Implementing 2D Array Algorithms
    14. 4.14Searching Algorithms
    15. 4.15Sorting Algorithms
    16. 4.16Recursion
    17. 4.17Recursive Searching and Sorting

The exam, part by part

2 parts, 3 h in all.

  • Section I: Multiple Choice

    Questions
    42
    Time
    1 h 30 min
    Weight
    55%

    No calculator

    Format details

    Four choices (A-D) per question. Discrete items plus short sets that share one class or code segment. Covers all four units; the Java Quick Reference is available throughout.

  • Section II: Free Response

    Questions
    4
    Time
    1 h 30 min
    Weight
    45%

    No calculator

    Format details

    Task types: methods-control-structures, class-design, data-analysis-arraylist, 2d-array

    Always one of each type, in this order: Q1 Methods and Control Structures (7 pts), Q2 Class Design (7 pts), Q3 Data Analysis with ArrayList (5 pts), Q4 2D Array (6 pts). 25 raw points. Code is typed in Bluebook and is never compiled or run.

How the 1 to 5 score is set

Section I (42 multiple-choice questions) counts for 55% and Section II (4 free-response questions, 25 raw points) counts for 45%. Each section is scaled to its weight and the two are added into a composite score, which College Board converts to a 1-5 AP score using cut points set for each exam. There is no penalty for wrong answers, so answer every multiple-choice question. Free-response points are awarded by criterion: most points check one specific requirement and can be earned even when other parts are wrong, while one or two points per question labeled (algorithm) require all the steps assembled correctly.

What you bring and get

The exam is fully digital in the Bluebook app. The Java Quick Reference (the accessible String, Integer, Double, Math, ArrayList, File, Scanner, and Object methods) is available in Bluebook for both sections, and schools may also hand out a printed copy. Scratch paper is provided, but only typed responses are scored. Calculators are not permitted (except a four-function calculator for students with an approved accommodation).

Skills the exam scores

  • 1.ADesign Code: choose a program design

    Decide on an appropriate program design, such as which classes, data, and methods, to solve a problem or accomplish a task.
  • 1.BDesign Code: extract knowledge from data

    Decide what information a data set can and cannot answer, and what data is needed for a given question.
  • 2.ADevelop Code: implement an algorithm

    Write Java that carries out an algorithm with expressions, selection, and iteration.
  • 2.BDevelop Code: data abstractions

    Write Java that creates and uses data abstractions: objects, classes, arrays, ArrayList, and 2D arrays.
  • 2.CDevelop Code: procedural abstractions

    Write Java that defines and calls methods, including library methods from the Java Quick Reference.
  • 3.AAnalyze Code: statement execution order

    Determine the output or result of code by following the order in which statements execute.
  • 3.BAnalyze Code: data abstractions

    Determine the output or result of code that uses objects, arrays, ArrayList, or 2D arrays.
  • 3.CAnalyze Code: procedural abstractions

    Determine the output or result of code that calls methods, including recursive methods.
  • 3.DAnalyze Code: find and fix errors

    Explain why a code segment will not compile or will not work as intended, and change it so it does.
  • 4.ADocument Code: describe behavior

    Describe in words what a code segment or program does.
  • 4.BDocument Code: initial conditions

    Describe the preconditions that must hold for a code segment to work as intended or described.
  • 5.AUse Computers Responsibly: impact

    Explain how computing affects society, the economy, and culture, including privacy, bias, reliability, and intellectual property.