Using Objects and Methods
Types, expressions, strings, methods, APIs
Goal: recognise a using objects and methods problem from its wording, carry out the governing method, and check that the result is reasonable.
Your answers are held until submission. The final review identifies the units that need another pass.
Building your AP Computer Science A question set. This can take a few seconds while the questions are matched to this course and its units.
The AP Computer Science A question set could not be created.
Please try again.
Connect every question to the exact skill it rehearses. Work through the units in order, then return to any topic that still needs a hint or a second attempt.
Types, expressions, strings, methods, APIs
Goal: recognise a using objects and methods problem from its wording, carry out the governing method, and check that the result is reasonable.
Boolean logic, conditionals, loops, algorithms
Goal: recognise a selection and iteration problem from its wording, carry out the governing method, and check that the result is reasonable.
Fields, constructors, methods, encapsulation
Goal: recognise a class creation problem from its wording, carry out the governing method, and check that the result is reasonable.
Arrays, ArrayList, 2D arrays, traversal, recursion
Goal: recognise a data collections problem from its wording, carry out the governing method, and check that the result is reasonable.
These 8 questions are printed in full on this page and are drawn across all 4 course units. Nothing here is generated on the fly. Cover the options, solve each one on paper, and only then open the worked answer to compare your method with the one shown.
Answer: "mpu"
Answer: 3 and 2
Answer: 4 times, sum 22
Answer: 12
Answer: The object the method was called on
Answer: 9
Answer: ["A", "D"]
Answer: 12
Use this map after marking your work. If two misses share a unit, review that unit before starting a generated set.
| Question | Unit | What it asks | Answer |
|---|---|---|---|
| 1 | Using Objects and Methods | What does "Computer".substring(2, 5) return in Java? | "mpu" |
| 2 | Using Objects and Methods | In Java, what are the values of 17 / 5 and 17 % 5 when both operands are ints? | 3 and 2 |
| 3 | Selection and Iteration | How many times does the loop for (int i = 1; i <= 10; i += 3) run, and what is the sum of the values of i? | 4 times, sum 22 |
| 4 | Selection and Iteration | An outer loop runs 4 times and contains an inner loop that runs 3 times. How many times does the innermost statement execute? | 12 |
| 5 | Class Creation | What does the keyword 'this' refer to inside a Java instance method? | The object the method was called on |
| 6 | Data Collections | An array holds {3, 8, 1, 9}. A loop compares each element to a running maximum that starts at the first element. What is the final value? | 9 |
| 7 | Data Collections | An ArrayList holds ["A", "B", "C", "D"]. What is left after calling remove(1) twice? | ["A", "D"] |
| 8 | Data Collections | How many elements does the array created by int[][] grid = new int[3][4] hold in total? | 12 |
The 8 questions above are fixed and checked. The generator at the top of the page is different: it writes fresh questions with AI from the course and unit information shown here, then the application checks each one for a complete prompt, four choices, one keyed answer, and an explanation. Generated questions are original practice—not official or released exam questions—and AI can still make mathematical mistakes. Verify a disputed answer with the stated method, your course materials, or the MathGPT solver, and follow the site's academic-integrity guidance.
It covers all 4 AP Computer Science A units listed above.
Submit the full test first. The result screen then shows every response, the correct answer, and the explanation so you can review each miss.
Multiple choice: 1 hour 30 minutes, 42 questions. Free response: 1 hour 30 minutes, 4 questions.
Rules change from section to section. Multiple choice: no calculator. Free response: no calculator. Provided for the whole exam: Java Quick Reference. Practise each section under its own rule.
All four: Using Objects and Methods, Selection and Iteration, Class Creation, Data Collections. Study first: Data Collections (30–40%) carries the largest published weighting.
Comparing Strings or objects with ==. That compares references. Use .equals for content.
Classify the miss as a definition, setup, calculation, interpretation, or timing error. Re-solve it from a blank page, then use the MathGPT tutor for a hint or method check.