Free-response practice
Computer Science A free-response questions
Free-response questions (FRQs) are the part of the AP® Computer Science A exam where you write your own answers. Here they're grouped the way the exam uses them. Write your answer, then score it yourself with the rubric and a model answer, or sign in for free AI scoring.
20 questions · 4 types
Question 1: Methods and Control Structures
You write two methods, or a constructor and a method, of a class you're given. Part A needs loops and/or if statements plus calls to the class's own methods; Part B needs String methods. New since the course was revised for 2025–26 (first tested in May 2026): it's worth 7 points instead of 9, and points are no longer taken off as penalties.
On the exam: Question 1 of 4, 7 points (Part A 4 points, Part B 3 points). Section II has 4 free-response questions in 90 minutes (45% of the score), all assessing Practice 2 (Develop Code). The exam is fully digital in Bluebook: you type your Java, and the Java Quick Reference is provided. No calculator. Suggested time is our split of the 90 minutes by points; College Board gives no per-question timing. Plan on about 25 minutes for one.
Units 1 and 2
Train route delays and station codes
7 points · about 25 minutes
Units 1 and 2
Digit-sum puzzle and mirror strings
7 points · about 25 minutes
Units 1, 2, 3 and 4
Rewards card constructor and top item
7 points · about 25 minutes
Units 1 and 2
Network outages and hidden email addresses
7 points · about 25 minutes
Units 1 and 2
Average with the lowest score dropped, and name formatting
7 points · about 25 minutes
Question 2: Class Design
You write a whole class from a description and a table of example calls and results: the class header, private instance variables, a constructor and the required method. New since the course was revised for 2025–26 (first tested in May 2026): it's worth 7 points instead of 9, and points are no longer taken off as penalties.
On the exam: Question 2 of 4, 7 points. Section II has 4 free-response questions in 90 minutes (45% of the score), all assessing Practice 2 (Develop Code). The exam is fully digital in Bluebook: you type your Java, and the Java Quick Reference is provided. No calculator. Suggested time is our split of the 90 minutes by points; College Board gives no per-question timing. Plan on about 25 minutes for one.
Units 2 and 3
Parking meter
7 points · about 25 minutes
Units 2 and 3
Thermostat modes
7 points · about 25 minutes
Unit 3
Library cards with numbers in order
7 points · about 25 minutes
Units 2 and 3
Overlapping time slots
7 points · about 25 minutes
Units 3 and 4
Party guest list
7 points · about 25 minutes
Question 3: Data Analysis with ArrayList
You write one method that traverses, analyzes or changes data stored in an ArrayList of objects, using the classes described in the question. New since the course was revised for 2025–26 (first tested in May 2026): it's always an ArrayList now (it used to be an array or an ArrayList), it's worth 5 points instead of 9, and points are no longer taken off as penalties.
On the exam: Question 3 of 4, 5 points. Section II has 4 free-response questions in 90 minutes (45% of the score), all assessing Practice 2 (Develop Code). The exam is fully digital in Bluebook: you type your Java, and the Java Quick Reference is provided. No calculator. Suggested time is our split of the 90 minutes by points; College Board gives no per-question timing. Plan on about 18 minutes for one.
Unit 4
Removing short songs from a playlist
5 points · about 18 minutes
Unit 4
Volunteers who reach an hours goal
5 points · about 18 minutes
Unit 4
Keeping a to-do list in priority order
5 points · about 18 minutes
Unit 4
Biggest day-to-day warm-up
5 points · about 18 minutes
Unit 4
Merging duplicate inventory entries
5 points · about 18 minutes
Question 4: 2D Array
You write one method that traverses, analyzes or changes data in a 2D array, often of objects, using the classes described in the question. New since the course was revised for 2025–26 (first tested in May 2026): it's worth 6 points instead of 9, and points are no longer taken off as penalties.
On the exam: Question 4 of 4, 6 points. Section II has 4 free-response questions in 90 minutes (45% of the score), all assessing Practice 2 (Develop Code). The exam is fully digital in Bluebook: you type your Java, and the Java Quick Reference is provided. No calculator. Suggested time is our split of the 90 minutes by points; College Board gives no per-question timing. Plan on about 22 minutes for one.
Unit 4
Finding a block of empty seats
6 points · about 22 minutes
Units 2 and 4
Counting peaks on a height map
6 points · about 22 minutes
Units 1 and 4
Filling a letter grid from a String
6 points · about 22 minutes
Unit 4
Crop totals for each column of a garden
6 points · about 22 minutes
Unit 4
Mirroring a picture left to right
6 points · about 22 minutes