How many times does `for (int i = 0; i < 5; i++)` execute?
Correct answer: $5$
Why: The loop runs for $i=0,1,2,3,4$, which is five iterations.
Answer original AP-style diagnostic questions, review explanations, and identify the next unit to study.
These are original practice questions, not copied College Board items. Use official released questions for final calibration.
The interactive set keeps answers hidden while you work. This review section remains crawlable and gives every student a complete correction path after the attempt.
Correct answer: $5$
Why: The loop runs for $i=0,1,2,3,4$, which is five iterations.
Correct answer: Whether they refer to the same object
Why: For object references, `==` tests reference identity, not equal field values.
Correct answer: It increases by one
Why: Appending one element increases the list's size by one.
Practising with a calculator you will not be handed is the most common way a practice score stops predicting an exam score. Set each practice block up to match the section it rehearses.
| Section or part | What you may use | What that means for your work |
|---|---|---|
| Multiple choice | No calculator | Arithmetic here is integer division and remainders you can do in your head. |
| Free response | No calculator | You write Java by hand on the exam. Practise without autocomplete or a compiler. |
| Provided for the whole exam | Java Quick Reference | String, Math, ArrayList, and Object methods are listed. Anything not on that sheet, you must remember. |
Types, expressions, strings, methods, APIs
15–25%: practice one recognition question, one direct application, and one mixed prompt that requires you to choose this unit without being told.
Boolean logic, conditionals, loops, algorithms
25–35%: practice one recognition question, one direct application, and one mixed prompt that requires you to choose this unit without being told.
Fields, constructors, methods, encapsulation
10–18%: practice one recognition question, one direct application, and one mixed prompt that requires you to choose this unit without being told.
Arrays, ArrayList, 2D arrays, traversal, recursion
30–40%: practice one recognition question, one direct application, and one mixed prompt that requires you to choose this unit without being told.
Each answer shows a relationship between course knowledge and an exam decision. A miss may mean that a definition is unclear, a representation was misread, or the right method was not selected. Compare each miss with these AP Computer Science A priorities before choosing the next unit or practice set.
The published format is 42 questions on multiple choice and 4 questions on free response. Multiple choice — About 2.1 minutes each. Code-tracing items take longer than vocabulary items, so move fast on the short ones. Free response — About 22 minutes each. Write the method header first, then the return statement, then fill in the middle.
Start with the heaviest published weightings: Data Collections (30–40%), Selection and Iteration (25–35%), Using Objects and Methods (15–25%). Then repair whichever earlier unit those depend on.
Only where the exam allows one, and practising otherwise builds the wrong habit. Multiple choice: Arithmetic here is integer division and remainders you can do in your head. Free response: You write Java by hand on the exam. Practise without autocomplete or a compiler. Provided for the whole exam: String, Math, ArrayList, and Object methods are listed. Anything not on that sheet, you must remember.
Off-by-one errors on bounds. Arrays use .length, Strings use .length(), and ArrayLists use .size() - and valid indexes stop one below each of them.
MathGPT.now is independent and is not affiliated with or endorsed by College Board. Exam formats can change.
Verify AP Computer Science A information on AP Central ↗