Skip to content
HopperHopper

Course navigation

Course · Complete

AP® Computer Science A

Java programming: objects and methods, selection and iteration, class creation, and data collections.

4 units · 53 topics · ~48 hours of study · 2,226 Java examples

About the course

AP Computer Science A is a first college-level course in programming with Java. You learn to design, write, trace, and test programs: first using objects and methods that already exist, then making decisions and repeating steps, then writing your own classes, and finally working with collections of data in arrays, ArrayLists, and 2D arrays.

Hopper follows the College Board’s 2025 course framework topic by topic. Every topic has a study guide with practice questions, runnable Java examples, and printable PDFs, with or without answers.

4 units · 53 topics

Units

Unit 1

Using Objects and Methods

Write your first Java programs: variables, expressions, input and output, and how to use the methods and objects that come with Java, such as Math and String.

  • 15–25% of multiple choice
  • ~32–34 class periods
  • ~13 hours of study
  • 15 topics
Show topics
  1. 1.1 Introduction to Algorithms, Programming, and Compilers, lesson kit available
  2. 1.2 Variables and Data Types, lesson kit available
  3. 1.3 Expressions and Output, lesson kit available
  4. 1.4 Assignment Statements and Input, lesson kit available
  5. 1.5 Casting and Range of Variables, lesson kit available
  6. 1.6 Compound Assignment Operators, lesson kit available
  7. 1.7 Application Program Interface (API) and Libraries, lesson kit available
  8. 1.8 Documentation with Comments, lesson kit available
  9. 1.9 Method Signatures, lesson kit available
  10. 1.10 Calling Class Methods, lesson kit available
  11. 1.11 Math Class, lesson kit available
  12. 1.12 Objects: Instances of Classes, lesson kit available
  13. 1.13 Object Creation and Storage (Instantiation), lesson kit available
  14. 1.14 Calling Instance Methods, lesson kit available
  15. 1.15 String Manipulation, lesson kit available

Unit 2

Selection and Iteration

Make programs decide and repeat: Boolean expressions, if statements, while and for loops, and classic algorithms built from them.

  • 25–35% of multiple choice
  • ~29–31 class periods
  • ~10 hours of study
  • 12 topics
Show topics
  1. 2.1 Algorithms with Selection and Repetition, lesson kit available
  2. 2.2 Boolean Expressions, lesson kit available
  3. 2.3 if Statements, lesson kit available
  4. 2.4 Nested if Statements, lesson kit available
  5. 2.5 Compound Boolean Expressions, lesson kit available
  6. 2.6 Comparing Boolean Expressions, lesson kit available
  7. 2.7 while Loops, lesson kit available
  8. 2.8 for Loops, lesson kit available
  9. 2.9 Implementing Selection and Iteration Algorithms, lesson kit available
  10. 2.10 Implementing String Algorithms, lesson kit available
  11. 2.11 Nested Iteration, lesson kit available
  12. 2.12 Informal Run-Time Analysis, lesson kit available

Unit 3

Class Creation

Design and write your own classes: instance variables, constructors, methods, scope and access, and the this keyword.

  • 10–18% of multiple choice
  • ~20–22 class periods
  • ~8 hours of study
  • 9 topics
Show topics
  1. 3.1 Abstraction and Program Design, lesson kit available
  2. 3.2 Impact of Program Design, lesson kit available
  3. 3.3 Anatomy of a Class, lesson kit available
  4. 3.4 Constructors, lesson kit available
  5. 3.5 Methods: How to Write Them, lesson kit available
  6. 3.6 Methods: Passing and Returning References of an Object, lesson kit available
  7. 3.7 Class Variables and Methods, lesson kit available
  8. 3.8 Scope and Access, lesson kit available
  9. 3.9 this Keyword, lesson kit available

Unit 4

Data Collections

Store and process many values: arrays, ArrayLists, 2D arrays, text files, searching, sorting, and recursion, along with the ethics of collecting data.

  • 30–40% of multiple choice
  • ~50–52 class periods
  • ~17 hours of study
  • 17 topics
Show topics
  1. 4.1 Ethical and Social Issues Around Data Collection, lesson kit available
  2. 4.2 Introduction to Using Data Sets, lesson kit available
  3. 4.3 Array Creation and Access, lesson kit available
  4. 4.4 Array Traversals, lesson kit available
  5. 4.5 Implementing Array Algorithms, lesson kit available
  6. 4.6 Using Text Files, lesson kit available
  7. 4.7 Wrapper Classes, lesson kit available
  8. 4.8 ArrayList Methods, lesson kit available
  9. 4.9 ArrayList Traversals, lesson kit available
  10. 4.10 Implementing ArrayList Algorithms, lesson kit available
  11. 4.11 2D Array Creation and Access, lesson kit available
  12. 4.12 2D Array Traversals, lesson kit available
  13. 4.13 Implementing 2D Array Algorithms, lesson kit available
  14. 4.14 Searching Algorithms, lesson kit available
  15. 4.15 Sorting Algorithms, lesson kit available
  16. 4.16 Recursion, lesson kit available
  17. 4.17 Recursive Searching and Sorting, lesson kit available

Weightings and class periods are the College Board's estimates for the multiple-choice section and a class that meets five days a week for 45 minutes.

3 hours · 2 sections, each timed separately

Exam at a glance

Section I

Multiple choice

questions
42
minutes
90
of your score
55%
Section II

Free response

questions
4
minutes
90
of your score
45%
  • You get the Java Quick Reference during the exam. It lists the library methods the exam may use.
  • Unit weightings apply to the multiple-choice section. All four free-response questions ask you to write code.

Lesson kits

For teachers

Topics with a lesson kit have a Teach tab: a lesson plan, slides, a worksheet, and an exit ticket, each with an answer key, as PDF, Word, and PPT downloads.

Download all AP CSA teacher filesEvery topic's slides, lesson plan, worksheet, and exit ticket, with keys (.zip)

Lesson kit pacing

UnitLesson kitsClass periodsCED estimate
Unit 1: Using Objects and Methods15 of 1533~32–34
Unit 2: Selection and Iteration12 of 1229~29–31
Unit 3: Class Creation9 of 921~20–22
Unit 4: Data Collections17 of 1751~50–52

Lesson kits plan 45-minute class periods, the length the College Board's class-period estimates assume.

Section II

Free-response questions

Section II always has these four questions, in this order. Each asks you to write Java code by hand from a description and examples.

  1. Question 1 · 7 points

    Methods and Control Structures

    Write two methods (or a constructor and a method) in a class you are given. Part A (4 points) uses loops or if statements and calls methods of the class. Part B (3 points) calls String methods.

    Prepare with

  2. Question 2 · 7 points

    Class Design

    Write a whole class from a description and a table of example calls: the class header, instance variables, a constructor, and a method.

    Prepare with

  3. Question 3 · 5 points

    Data Analysis with ArrayList

    Write one method that uses, analyzes, or changes the data in an ArrayList.

    Prepare with

  4. Question 4 · 6 points

    2D Array

    Write one method that uses, analyzes, or changes the data in a 2D array.

    Prepare with