← All AP® study guides
AP® Study Guide Printable PDF · 41 pages

TransferCredit.org Guide to AP® Computer Science A

AP® Computer Science A study guide: a printable PDF built from the College Board's official course and exam description, heaviest topics first.

  • 230 key terms, each with an example
  • 40 practice questions with every answer explained
  • A 2-page cram sheet for the night before
  • 2-, 4- and 8-week study plans built from the exam weights
Not sure yet? Try 10 free questions

Last updated 2026 · exam details checked against the College Board's published exam information in 2026

Look inside the guide

Real pages from the 41-page PDF.

Page 1 of the TransferCredit.org Guide to AP® Computer Science A: the cover
Page 1 The cover
Page 6 of the TransferCredit.org Guide to AP® Computer Science A: the Chapter 1 opener
Page 6 The Chapter 1 opener
Page 12 of the TransferCredit.org Guide to AP® Computer Science A: a chapter quiz
Page 12 A chapter quiz
Page 40 of the TransferCredit.org Guide to AP® Computer Science A: the 2-page cram sheet
Page 40 The 2-page cram sheet

What you get for $5

One chapter for each area of the official course and exam description, heaviest topics first.

  • 📘41pages, printable
  • 🧭4chapters
  • 🔑230terms with examples
  • ✍️40practice questions, answers explained
  • ⚠️12exam traps to avoid
  • 📄2page cram sheet

Try 10 free AP® Computer Science A questions

Multiple-choice questions taken from the guide's chapter quizzes: 4 areas, heaviest first. About 20 minutes, with every answer explained and a score by area. The exam's free-response questions aren't in this quiz: see how the exam works.

10 questions  
  1. Question 1 · Data Collections
    A city estimates residents’ access to public sports facilities using an online survey advertised only through its paid recreation-membership app. Most recorded responses report easy access. Which conclusion is best supported by the collection method?
    Show the answer

    Answer: A. The responses may underrepresent residents without paid memberships, so they cannot alone establish access for all residents.. The collection channel favors people already connected to the paid membership service. More responses through that channel do not necessarily cover the residents it misses.

    The trap: Removing names addresses one privacy concern, but it does not make the membership-based sample representative.

  2. Question 2 · Selection and Iteration
    Trace both decisions, including the else attached to the later test. What final number is displayed?
    int steps = 3;
    if (steps < 5)
    {
        steps += 4;
    }
    if (steps > 6) { steps -= 2; }
    else { steps *= 2; }
    System.out.println(steps);
    Show the answer

    Answer: D. 5. The first test changes steps from 3 to 7. The later test is then true and subtracts 2; its else is skipped.

    The trap: 7 stops after the earlier if, treating the later decision as an else-if that was never reached.

  3. Question 3 · Using Objects and Methods
    A shuttle planner runs this calculation. Which value is displayed?
    int riders = 19;
    int seats = 6;
    double trips = riders / seats;
    trips += 0.5;
    System.out.println(trips);
    Show the answer

    Answer: C. 3.5. The division uses two ints, so it produces 3. Assignment widens that value to 3.0; adding 0.5 gives 3.5.

    The trap: 3.6666666666666665 treats the initial division as double division because trips is double.

  4. Question 4 · Class Creation
    A print-shop program has three methods that each calculate a delivery surcharge using the same rule but different distances. Which redesign best reduces duplicated logic while preserving the three existing public methods?
    Show the answer

    Answer: B. Have each existing method call one helper that accepts the distance and calculates the surcharge.. A distance parameter lets one helper calculate each result while existing public methods keep their contracts.

    The trap: Caching the first distance can use the wrong value on later calls.

  5. Question 5 · Data Collections
    Track the shared array through this rightward shift. Which sequence is stored in a afterward?
    int[] a={2,5,8,11};
    int[] view=a;
    for(int i=view.length-1;i>0;i--) {
        view[i]=view[i-1];
    }
    view[0]=0;
    Show the answer

    Answer: D. [0,2,5,8]. view and a reference the same array. Descending indices preserve the old values while shifting them right; the first slot is then replaced with zero.

    The trap: [0,2,2,2] is the propagation pattern from copying rightward with increasing indices, which overwrites values before they are used.

  6. Question 6 · Selection and Iteration
    A marker check must be true exactly when tag is nonnull and begins with #. Which expression works for null, empty and nonempty Strings?
    Show the answer

    Answer: A. (tag != null) && (tag.length() > 0) && tag.substring(0, 1).equals("#"). Conditional AND evaluates left to right. A null reference stops at the guard; an empty String stops at the length test; other Strings reach the content test.

    The trap: tag != null || tag.length() > 0 && tag.substring(0, 1).equals("#") accepts any nonnull String and can dereference null.

  7. Question 7 · Using Objects and Methods
    A client calls token.substring(start, start + 3). Which requirement guarantees a valid call for every allowed start?
    Show the answer

    Answer: C. token is nonnull, and 0 ≤ start ≤ token.length() − 3.. The start must be nonnegative and the exclusive end start + 3 cannot exceed the String length. These bounds also require at least three characters.

    The trap: 0 ≤ start < token.length() still allows a start near the end, where the requested three-character span exceeds the String.

  8. Question 8 · Class Creation
    Examine this constructor and query. What integer does the final line display?
    class Tag {
        private int value;
        public Tag(int value) { value = value; }
        public int read() { return value; }
    }
    Tag t = new Tag(14);
    System.out.println(t.read());
    Show the answer

    Answer: B. 0. Both bare names select the parameter; the unassigned instance field keeps its default 0.

    The trap: 14 assumes the left side means this.value; the parameter shadows that field.

  9. Question 9 · Data Collections
    This method must count equal adjacent pairs for every non-null int array, including an empty array. Which condition completes the loop safely and checks every neighboring pair?
    public static int pairs(int[] a) {
        int count=0;
        for(int i=0; /* condition */; i++) {
            if(a[i]==a[i+1]) count++;
        }
        return count;
    }
    Show the answer

    Answer: C. i < a.length - 1. The second access is i+1, so the last usable i is length-2. The strict bound length-1 includes exactly those starts and runs zero times for arrays shorter than two.

    The trap: i < a.length allows i to reach the last index, making a[i+1] an invalid access.

  10. Question 10 · Selection and Iteration
    A sensor accepts an integer temperature unless it is below 4 or above 9. Which expression describes the accepted values, including both endpoints?
    Show the answer

    Answer: D. (temperature >= 4) && (temperature <= 9). Accepted values must meet both inclusive bounds. This is the negation of temperature < 4 OR temperature > 9.

    The trap: temperature >= 4 || temperature <= 9 is true for every integer because at least one of those comparisons always holds.

The AP® Computer Science A exam at a glance

The AP® Computer Science A exam is from the College Board. It has 42 multiple-choice questions, plus 4 free-response questions. You get 90 minutes for multiple choice; 3 hours in all, no calculator. The score scale is 1–5 (AP® score scale; your college decides credit). The guide has 4 chapters, one for each area of the official course and exam description; the heaviest is Data Collections at 30–40%.

Questions
42multiple-choice questions, plus 4 free-response questions
Time
90 minfor the 42 multiple-choice questions, about 129 seconds a question
Score
1–5AP® score scale; your college decides credit
Fee
$99per exam in the U.S. and Canada in 2026-27; your school may charge more
Calculator
Nonot allowed
Wrong answers
No penaltya wrong answer costs nothing
  • Section I has 42 multiple-choice questions in 90 minutes for 55% of your AP® score. Most are individual questions; occasional sets contain two questions. Trace the supplied Java code and its stated initial conditions.
  • Section II has four free-response questions in 90 minutes for 45%: Methods and Control Structures; Class Design; Data Analysis with ArrayList; and 2D Array. Practice writing complete solutions from specifications, not just choosing code fragments.
  • The current CED gives the four free-response questions 7, 7, 5 and 6 raw points respectively. The 90 minutes is shared across them; these are not four separately timed blocks.
  • The Java Quick Reference lists the accessible library constructors and methods for both sections. It is included in Bluebook; schools may provide the printed reference. Use it during practice to check method signatures, parameters and return values.
  • The exam is fully digital in Bluebook, on Wednesday, May 12, 2027, Session 2. Your AP® coordinator confirms the start time and location. No calculator is normally allowed.
  • The Bluebook free-response code editor does not compile code or provide feedback. Practice tracing and writing without IDE completion, then test your practice code separately. Multiple-choice scoring counts correct answers without a deduction for wrong answers.

Source: official AP® Computer Science A page and the official course and exam description. Last updated 2026.

What the exam covers

4 chapters, heaviest first, with each area's official weight. The guide's chapters follow this order.

  1. Data Collections30–40% · ~13–17 Q
  2. Selection and Iteration25–35% · ~11–15 Q
  3. Using Objects and Methods15–25% · ~6–11 Q
  4. Class Creation10–18% · ~4–8 Q

Where to start: the 2 heaviest areas (marked in the map) carry about 27 of the 42 questions. The guide puts them first, so working front to back covers the most points earliest.

AP® Computer Science A study guide by area

The heaviest area is open to read now. The full guide has a chapter for every area, each with all its terms, a quiz and an answer key.

1 of 4 chapters open  ·  in the guide's order
30–40% · about 13–17 questions · free preview Data Collections Chapter 1 of the guide

Choose a collection whose structure fits the task, then track both its values and its valid indices. File reading, changing list sizes, two-dimensional traversal, and recursive traces each add their own conditions to check.

Key terms, with examples

Personal-data privacy
Protect people’s information from inappropriate collection, exposure, and use; even records without names may identify someone when combined with other data.
Example: A published travel log omits names, but exact home locations still reveal individual travelers.
Data set
A collection of related pieces of information that can be examined to answer a question.
Example: A garden’s weekly table lists bed identifiers, watering amounts, and plant heights.
Array element type
An array stores elements of one declared type; primitive arrays store primitive values, while object arrays store references.
Example: String[] names = new String[2]; creates two slots for String references.
Indexed array traversal
Use an index that visits the required array positions; indexed access can replace the values stored in those positions.
Example: int[] prices={8,12}; for(int slot=0;slot<prices.length;slot++) prices[slot]/=2; halves both stored prices.
Array minimum and maximum
For a nonempty array, initialize an extreme from an actual element, then compare remaining elements to retain the smallest or largest.
Example: int[] a={5,2,9}; int min=a[0]; for(int n:a) if(n<min) min=n; finds 2.
File pathname object
A File object represents a pathname; creating it alone does not open the file for reading.
Example: File path=new File("readings.txt"); represents a pathname, even before any Scanner opens it.
Integer and Double wrappers
Immutable object types representing int and double values; they allow numeric values to be used where object references are required.
Example: Integer count=5; Double rate=1.25; stores references to immutable numeric wrapper objects.
Generic ArrayList
A resizable ordered collection of object references whose declared type argument specifies the element type; use wrappers for primitive numeric values.
Example: ArrayList<String> notes=new ArrayList<String>(); creates an empty list of String references.
Indexed list traversal
Use indices from zero through the current size minus one to access entries; reason about changed indices whenever insertion or deletion changes the list.
Example: For a containing “up”, “in”, for(int i=0;i<a.size();i++) System.out.print(a.get(i)); displays upin.
Array of row arrays
A two-dimensional array is an array whose elements reference row arrays; each row array contains the values for that row.
Example: int[][] grid=new int[2][3]; creates two row arrays, each with three integer slots.
Row-major traversal
Visit every column within one row before moving to the next row; an indexed version uses rows outside and columns inside.
Example: For int[][] g={{1,2},{3,4}};, row-major visitation is 1, 2, 3, 4.
Row or column reduction
Combine entries from one selected row or column, varying only the other index; initialize separately for each result and guard empty averages.
Example: For g at least 1×2, int sum=0; for(int r=0;r<g.length;r++) sum+=g[r][1]; totals that column.

What this area covers

Responsible dataData-set planningArray storageArray traversalArray algorithmsText-file dataWrappersArrayList operationsArrayList traversal and algorithmsRectangular 2D storage2D traversal2D algorithmsSearchingIterative sortingReading recursionRecursive search and sort

How the exam asks it

Trace stored values and indices, choose or repair a traversal, and explain when an algorithm meets its specification. Written practice must include complete ArrayList and 2D-array methods. For supplied recursive code, follow calls and returns; for search and sort traces, record the remaining interval or sorted region after each step.

Common traps

Trap 1. Separate three size operations: arrays use a length field, Strings use length(), and ArrayLists use size(). A valid element index is smaller than the relevant count.

Trap 2. A file loop needs suitable data as well as a presence check. hasNext reports another token, but does not promise that nextInt can read it.

Trap 3. Keep coordinate meaning consistent: the first 2D index selects a row. A row count cannot serve as a column bound unless the stated dimensions justify it.

Memory trick

Draw the moving boundary: mark processed entries, the current index, and the remaining region before updating a traversal.

Trace recursion with stacked rows: record each call’s arguments and leave room for its returned value.

How AP® Computer Science A questions are written

The exam has 42 multiple-choice questions, plus 4 free-response questions. The guide sorts the questions into 5 types; spot the type and you'll know what the question wants before you read the choices.

Type 1

Trace statement execution

Multiple choice asks for output or a final value after Java statements execute.

  • Record each variable’s type and starting value.
  • Evaluate one statement at a time, keeping integer and double operations distinct.
  • Compare the final result with every choice.
Type 2

Use a documented interface

Choose a valid constructor or method call using supplied signatures and contracts. Some distractors compile but perform a different call.

  • Read the receiver and whether the method is static.
  • Match argument number, order and compatible types.
  • Check the returned value against the requested behavior.
Type 3

Complete an algorithm

Supply a condition, update or code segment that fulfills a specification for every permitted input. This reasoning also supports written free-response solutions.

  • State what must be true when the algorithm finishes.
  • Trace a normal case and a boundary case for each candidate.
  • Reject code that stops too early, goes too far or cannot progress.
Type 4

Implement from a specification

Free response requires complete methods, constructors or classes from stated requirements. This short choice exercise illustrates one decision; it does not replace a full written response.

  • Identify the parameters, required result and preconditions.
  • Plan the operations, then write the complete requested code.
  • Check boundaries and any requirement to preserve existing data.
Type 5

Explain code and its conditions

Describe an algorithm’s purpose, its required starting conditions or the reason a supplied segment fails.

  • Identify what each changing variable represents.
  • Trace a small valid input and relate updates to the result.
  • Describe the general behavior, including the stated boundary cases.

Test-day habits that add points

  1. Answer every question. There's no penalty for a wrong answer. A blank is always worth zero, so never leave one.
  2. Predict, then look. Name the answer before reading the choices. It protects you from distractors written to sound right.
  3. Eliminate. Cross out choices you know are wrong. Every choice you rule out raises your odds on a guess.
  4. Mark and move on. After a productive attempt, choose your best answer, mark the question and return if time allows. Keep enough of the 90-minute multiple-choice section for the remaining questions.
  5. Check the stated conditions. Judge code against every permitted input. Words such as "always" or "only" can be exactly right; look for a real counterexample rather than using their wording as evidence.
  6. Change answers for a reason. Switch an answer only when you can say why the new one is better, such as a detail you missed.
  7. Write all four free-response formats. Practice all four formats within the shared 90 minutes: Methods and Control Structures, Class Design, Data Analysis with ArrayList, and 2D Array. Write complete solutions using the Java Quick Reference. Bluebook does not compile or give feedback; test practice solutions afterward.

Pacing: 42 questions in 90 minutes, about 129 seconds a question.

AP® Computer Science A flashcards

Try the first 8 cards free. Read the term, say the definition out loud, then select the card to check yourself. Arrow keys move between cards.

Free card 1 of 8 (deck total: 230)

How to study for AP® Computer Science A: a 5-step plan

Follow the steps, then enter your test date. The planner gives you a dated plan that starts with the heaviest areas and saves the last days for review.

  1. Take the 10 free questionsSee which AP® Computer Science A areas you already know.
  2. Study the heaviest areas firstStart with Data Collections, Selection and Iteration and Using Objects and Methods, then work down the exam map.
  3. Learn each term with an exampleSay the definition out loud, then check it with the flashcards. A term you can't use in an example isn't learned yet.
  4. Quiz yourself and study the trapsAfter each area, answer its quiz and read why the tempting wrong answer is wrong.
  5. Plan backwards from your exam dateBuild a dated plan, keep the last days for a full review, and read the cram sheet the night before.

How it works

  1. 1Check outSelect Get the guide · $5 and pay on TransferCredit.org's secure checkout.
  2. 2Download the PDFFrom your TransferCredit.org account.
  3. 3Study the heaviest areas firstFollow the 2-, 4- or 8-week plan, then read the cram sheet the night before.

This page or the full guide

Everything on this page is free with no account. The full guide is a PDF you keep.

What's on this page and in the full study guide
Study toolThis pageFull study guide ($5)
ChaptersA preview of 1 of 4All 4
Terms explainedA sample from the open chaptersAll 230, each with an example
Practice questions10 free questions40, with an answer key
Flashcards8 cardsAll 230 terms on the self-check list
Study planDated planner2-, 4- and 8-week plans
Cram sheet—2 pages, for the night before
FormatWeb page41-page PDF, printable

Questions students ask

What's in the full AP® Computer Science A study guide?
41 pages: 4 chapters, one for each area of the College Board's official course and exam description, heaviest topics first. 230 terms, each with a plain-English definition and an example, common traps and memory tricks, 40 practice questions with an answer key that explains every answer, question tactics, 2-, 4- and 8-week study plans and a 2-page cram sheet.
How much is the full AP® Computer Science A study guide?
The full 41-page PDF is $5. The 10 practice questions on this page are free.
How do I get the full guide?
Select Get the guide · $5 and check out on TransferCredit.org. Then sign in to your TransferCredit.org account to download the PDF.
Can I print the guide or use it on my phone?
Yes. It's a PDF, so it opens on phones, tablets and computers, and printing is allowed. Its tick boxes and answer bubbles work in PDF readers that support forms. Copying and editing are turned off.
Can I try the AP® Computer Science A guide before I buy it?
Yes. This page has 10 questions from the guide's own chapter quizzes, a preview of the heaviest area, 8 flashcards and a study planner. No account needed.
Is this an official AP® study guide?
No. AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse, this guide. TransferCredit.org is independent. We built the guide from the College Board's official course and exam description, and the exam details were checked against the College Board's published exam information in 2026.
How was this study guide made?
One chapter for each area of the official course and exam description, using its published weights. Each chapter was written, then fact-checked against the official exam information in a separate review. The practice questions are original: none are copied from the College Board's released questions.
How up to date is this AP® Computer Science A guide?
Last updated 2026. The exam details were checked against the College Board's published exam information in 2026. Exams change, so confirm the details on the official AP® Computer Science A page before you test.
More questions about the AP® Computer Science A exam (16)
What is the AP® Computer Science A exam?
The AP® Computer Science A exam is from the College Board. It has 42 multiple-choice questions, plus 4 free-response questions. You get 90 minutes for multiple choice; 3 hours in all, no calculator. The score scale is 1–5 (AP® score scale; your college decides credit). The guide has 4 chapters, one for each area of the official course and exam description; the heaviest is Data Collections at 30–40%.
How many questions are on the AP® Computer Science A exam, and how long is it?
Section I has 42 multiple-choice questions in 90 minutes for 55% of your AP® score. Most are individual questions; occasional sets contain two questions. Trace the supplied Java code and its stated initial conditions. Section II has four free-response questions in 90 minutes for 45%: Methods and Control Structures; Class Design; Data Analysis with ArrayList; and 2D Array. Practice writing complete solutions from specifications, not just choosing code fragments.
How is the AP® Computer Science A exam scored?
The score scale is 1–5: AP® score scale; your college decides credit. Multiple-choice scoring counts correct answers without a deduction for wrong answers.
What AP® Computer Science A score do I need for college credit?
Your college decides credit. Each college sets its own credit policy, so check the one at your college before you count on the credit.
How much does the AP® Computer Science A exam cost?
The fee is $99: per exam in the U.S. and Canada in 2026-27; your school may charge more. Fees can change, so check the official page when you register.
Can I use a calculator on the AP® Computer Science A exam?
No calculator is normally allowed.
Is there a penalty for guessing on AP® Computer Science A?
No. There's no penalty for a wrong answer. A blank is always worth zero, so never leave one.
What topics are on the AP® Computer Science A exam?
4 areas, from the official course and exam description: Data Collections (30–40%); Selection and Iteration (25–35%); Using Objects and Methods (15–25%); Class Creation (10–18%).
Which AP® Computer Science A topics should I study first?
The 2 heaviest areas (marked in the map) carry about 27 of the 42 questions. The guide puts them first, so working front to back covers the most points earliest.
Is the AP® Computer Science A exam hard?
It depends on what you already know. There are only 4 areas, so each one carries real weight: Data Collections (30–40%), Selection and Iteration (25–35%), Using Objects and Methods (15–25%) and Class Creation (10–18%). Try the 10 free questions above to see where you stand in about 20 minutes.
What kinds of questions are on the AP® Computer Science A exam?
The exam has 42 multiple-choice questions, plus 4 free-response questions. The guide sorts the questions into 5 types: “Trace statement execution”, “Use a documented interface”, “Complete an algorithm”, “Implement from a specification” and “Explain code and its conditions”. Multiple-choice questions have 4 answer choices. See how each type is written.
What are the free-response questions on the AP® Computer Science A exam?
Practice all four formats within the shared 90 minutes: Methods and Control Structures, Class Design, Data Analysis with ArrayList, and 2D Array. Write complete solutions using the Java Quick Reference. Bluebook does not compile or give feedback; test practice solutions afterward.
How should I pace myself on the AP® Computer Science A exam?
42 questions in 90 minutes, about 129 seconds a question. After a productive attempt, choose your best answer, mark the question and return if time allows. Keep enough of the 90-minute multiple-choice section for the remaining questions.
How long should I study for AP® Computer Science A?
Take the 10 free questions to see where you stand. The full guide has 2-, 4- and 8-week plans built from the exam weights, and the planner on this page builds a dated plan from your exam date.
How do I know I'm ready for the AP® Computer Science A exam?
The guide's readiness checklist: You can trace values, references, conditions and loops, and explain a result or failure using the supplied code. You can write complete methods and classes from specifications, respecting preconditions and testing boundaries. You can process ArrayList and rectangular 2D-array data without invalid indices or unintended changes. You have completed timed multiple-choice sets and full written solutions for all four free-response formats; these compact quizzes alone do not establish exam readiness. You have rehearsed Bluebook and the Java Quick Reference without compiler feedback, and confirmed your exam arrangements.
What should I do the night before?
Read the 2-page cram sheet once, slowly. Confirm your exam time and location with your AP® coordinator. Practice Bluebook and the Java Quick Reference; the code editor does not compile responses or give feedback. No calculator is normally allowed. In the morning, skim the traps, then stop studying.

How we built this guide

We built one chapter for each area of the College Board's official course and exam description for AP® Computer Science A, using its published weights to order the chapters and size the quizzes. Each chapter was written, then fact-checked against the official exam information in a separate review. The exam details were checked against the College Board's published exam information in 2026.

Sources: official AP® Computer Science A page, official course and exam description. Last updated 2026.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse, this guide. TransferCredit.org is independent and not affiliated with the College Board. © 2026 UPI Globale Edu Inc.

Ready for the full AP® Computer Science A guide? 41 pages, 230 terms, 40 practice questions and a 2-page cram sheet, $5.

Get the guide · $5

In the full guide

TransferCredit.org Guide to AP® Computer Science A

  • All 4 chapters
  • 230 terms with examples
  • 40 practice questions with an answer key
  • A 2-page cram sheet and 2-, 4- and 8-week plans
Get the guide · $5