Practice 3.D: Explain why a code segment will not compile or work as intended.
LO 1.3.A: Develop code to generate output and determine the result that would be displayed
Consider the following code segment.
System.out.print(Take all the courses in your curriculum.);
System.out.println(Ask questions.);
System.out.println(--Katherine Johnson);
The code segment is intended to produce the following output but does not work as intended.
Take all the courses in your curriculum. Ask questions.
--Katherine Johnson
Which changes should be made so that the code segment produces the intended output?
I. In line 1, print should be changed to println.
II. In lines 1, 2, and 3, print should be capitalized.
III. In lines 1, 2, and 3, the text inside the parentheses should be in quotation marks.
I only
print is correct since a new line is not printed after the first line of output.
II only
Only class names like System are capitalized.
III only
Correct.
I and II
I and II are not correct.
I and III
print is correct since a new line is not printed after the first line of output.
I don’t know this yet
That’s okay. You will learn debugging skills in the PD.
This curriculum will prepare you for the Advanced Placement Computer Science A Exam which tests your programming skills in Java.
The AP CSA exam is 3 hours long and has two sections: multiple choice and free-response. You will be given one hour and 30 minutes for each part. The first part has 42 multiple-choice questions worth 55% of your grade, and the second part has 4 free response questions (FRQs), where you write Java code, worth 45% of your grade. During the exam, you will have access to the AP CSA Java Quick Reference Sheet 1
Free Response Question 1 Methods and Control Structures (7 points): Students will write two methods or one constructor and one method of a given class based on provided specifications and examples. In Part A (4 points), the method or constructor will require students to write iterative or conditional statements, or both, as well as statements that call methods in the specified class. In Part B (3 points), the method or constructor will require calling String methods (which is different from AP FRQs prior to 2026).
Free Response Question 2 Class Design (7 points): Students will be instructed to design and implement a class based on provided specifications and examples. A second class might also be included. Students will be provided with a scenario and specifications in the form of a table demonstrating ways to interact with the class and the results. The class must include a class header, instance variables, a constructor, a method, and implementation of the constructor and required method. (Inheritance is no longer covered in the AP exam and FRQs.)
Free Response Question 3 Data Analysis with ArrayList (5 points): Students will be provided with a scenario and its associated class(es).Students will write one method of a given class based on provided specifications and examples. The method requires students to use, analyze,and manipulate data in an ArrayList structure. (Arrays will not be tested in an FRQ.)
Free Response Question 4 2D Array (6 points): Students will be provided with a scenario and its associated class(es). Students will write one method of a given class based on provided specifications and examples. The method requires students to use, analyze,and manipulate data in a 2D array structure. (This usually requires the use of nested loops.)
The College Board specifies the AP CSA course in the 4 units shown in the table below. On the College Board’s AP Portal they provide formative assessments called Personal Progress Checks for each unit. This CSAwesome curriculum is organized around the AP CSA units and also provides many interactive exercises in each unit.
The College Board also requires AP CSA courses to provide at least 20 hours of lab time for you to practice Java programming.
The table below reflects the 2025-2026 revisions to AP CSA where the content is reorganized into 4 large units. The new unit 1 is a combination of the old units 1 & 2, the new unit 2 is a combination of the old units 3 & 4, the new unit 3 corresponds to the old unit 5, and the new unit 4 is a combination of the old units 6, 7, 8, and 10. The old unit 9 on inheritance is no longer a part of the AP CSA exam but is included as an optional unit 5 in CSAwesome2.
Table0.2.2.
Unit
Title
Exam Weight
Class Days
Lab Days
Old Map
1
Using Objects & Methods
15-25%
32-34
old U1 & U2
2
Selection & Iteration
25–30%
29-31
7-10
old U3 & U4
3
Class Creation
10-18%
20-22
3-6
old U5
4
Data Collections
30-40%
50-52
13-21
old 6,7,8,10
For more information on the exam see the College Board AP CSA site 3
that categorizes the past FRQs by topic and provides links to their solutions (which are available online in many places). The College Board provides a question bank and formative assessment quizzes for each unit online for registered AP classes.