AP CSA Practice Questions
Free AP Computer Science A multiple-choice practice, organized by unit and topic. Answer five random questions at a time and review the essential knowledge behind each one.
The AP Computer Science A exam opens with 42 multiple-choice questions, and the best way to get comfortable with them is to answer a lot of them. This series gives you 1138 practice questions split into 20 short sets, each one covering a few consecutive topics from the course.
How the practice sets work
- Every set has its own page, named for the topics it assesses.
- Each visit loads five random questions from that set's bank. Reload or press New questions for a different five.
- Pick an answer and press Check answer. You'll see whether you were right and why every choice is right or wrong.
- Once you've checked a question, a table lists the essential knowledge (EKS) statements it assesses. Each one links to the full list at the bottom of the page.
What the codes mean
The AP Computer Science A course is organized into 4 units, and each unit into numbered topics (1.1, 1.2, and so on). Every topic has learning objectives (1.1.A) and each learning objective has essential knowledge statements (1.1.A.1). These statements are what the exam can ask about, so each question here is tagged with the ones it tests.
The questions use the same Java conventions as the exam, so keep the College Board's Java Quick Reference handy as you practice.
Unit 1: Using Objects and Methods
- Topics 1.1–1.2: Algorithms, Compilers, and Variables
- Topics 1.3–1.6: Expressions, Assignment, Casting, and Compound Operators
- Topics 1.7–1.9: APIs, Comments, and Method Signatures
- Topics 1.10–1.11: Class Methods and the Math Class
- Topics 1.12–1.15: Objects, Instantiation, and Strings
Unit 2: Selection and Iteration
- Topics 2.1–2.3: Boolean Expressions and if Statements
- Topics 2.4–2.6: Nested if and Compound Booleans
- Topics 2.7–2.8: while and for Loops
- Topics 2.9–2.10: Selection, Iteration, and String Algorithms
- Topics 2.11–2.12: Nested Iteration and Run-Time Analysis
Unit 3: Class Creation
- Topics 3.1–3.2: Abstraction and Program Design
- Topics 3.3–3.4: Anatomy of a Class and Constructors
- Topics 3.5–3.6: Writing Methods and Passing References
- Topics 3.7–3.9: Class Variables, Scope, and this
Unit 4: Data Collections
- Topics 4.1–4.2: Data Collection Ethics and Data Sets
- Topics 4.3–4.5: Array Creation, Traversal, and Algorithms
- Topics 4.6–4.7: Text Files and Wrapper Classes
- Topics 4.8–4.10: ArrayList Methods, Traversals, and Algorithms
- Topics 4.11–4.13: 2D Arrays
- Topics 4.14–4.17: Searching, Sorting, and Recursion