• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 81 pages
Exam (elaborations)

AP Computer Science A Study Guide 2026–2027 | Java Programming, Object-Oriented Programming, Arrays, ArrayLists, Inheritance, Algorithms, FRQ Practice & Multiple-Choice Exam Review

Document preview thumbnail
Preview 4 out of 81 pages

Prepare for the 2027 AP Computer Science A Exam with this comprehensive Java programming study guide. Designed for students taking the College Board Advanced Placement Computer Science A course, this resource covers essential programming concepts, object-oriented programming, algorithms, data structures, code analysis and exam-style practice. AP Computer Science A introduces college-level computer science through Java programming. Students learn to design, write, test, analyze and document programs while developing computational thinking and problem-solving skills. This study guide provides structured revision of the major course topics, with particular attention to Java syntax, methods, classes, loops, arrays, ArrayLists, algorithms and free-response programming tasks.

Content preview

AP Computer Science A Study Guide 2026–2027 | Java
Programming, Object-Oriented Programming, Arrays,
ArrayLists, Inheritance, Algorithms, FRQ Practice &
Multiple-Choice Exam Review
Question 1: What is the result of the expression 17 % 3 in Java?
A. 5
B. 2
C. 1
D. 0
CORRECT ANSWER: B. 2
Rationale: The modulo operator (%) returns the remainder of division,
and 17 divided by 3 is 5 with a remainder of 2.
Question 2: What is the value of the integer variable x after the
statement int x = ; is executed?
A. 3.75
B. 3
C. 4
D. 3.0
CORRECT ANSWER: B. 3
Rationale: Integer division in Java truncates the decimal portion, so 15
divided by 4 evaluates to 3.
Question 3: What is the value of the double variable y after double y =
; is executed?
A. 3.75
B. 3.0

,C. 4.0
D. 3
CORRECT ANSWER: B. 3.0
Rationale: Because both 15 and 4 are integers, integer division occurs
first resulting in 3, which is then implicitly cast to the double value 3.0.
Question 4: What is the value of z after double z = (double) ; is
executed?
A. 3.75
B. 3.0
C. 4.0
D. 3
CORRECT ANSWER: A. 3.75
Rationale: The cast (double) applies only to 15, making it 15.0, so
floating-point division occurs, resulting in 3.75.
Question 5: What is the value of x after int x = 5; x = x + 2.5; is
executed?
A. 7.5
B. 7
C. 8
D. A compile-time error occurs.
CORRECT ANSWER: D. A compile-time error occurs.
Rationale: Java does not allow implicit narrowing conversions; assigning
a double (7.5) to an int variable requires an explicit cast.

,Question 6: What is printed by System.out.println(5 + 3 + "Hello");?
A. 53Hello
B. 8Hello
C. Hello8
D. A compile-time error occurs.
CORRECT ANSWER: B. 8Hello
Rationale: Addition is evaluated left-to-right; 5 + 3 is 8, and then 8 is
concatenated with the string "Hello".
Question 7: What is printed by System.out.println("Hello" + 5 + 3);?
A. Hello8
B. Hello53
C. 8Hello
D. A compile-time error occurs.
CORRECT ANSWER: B. Hello53
Rationale: String concatenation occurs left-to-right; "Hello" + 5
becomes "Hello5", which is then concatenated with 3 to become
"Hello53".
Question 8: What is the value of x after int x = 4; x++;
System.out.println(x++);?
A. 4
B. 5
C. 6
D. 7

,CORRECT ANSWER: B. 5
Rationale: The first x++ increments x to 5, and the second x++ prints the
current value 5 before incrementing x to 6.
Question 9: What is the value of x after int x = 4; ++x;
System.out.println(++x);?
A. 4
B. 5
C. 6
D. 7
CORRECT ANSWER: C. 6
Rationale: The first ++x increments x to 5, and the second ++x
increments x to 6 and then prints 6.
*Question 10: What is the value of x after int x = 10; x = 2 + 3;?
A. 50
B. 23
C. 26
D. 15
CORRECT ANSWER: B. 23
Rationale: The right side of a compound assignment operator is
evaluated first, so 2 + 3 is 5, and 10 * 5 is 50. Wait, 10 * 5 is 50. Let me
correct the options.
*Question 10: What is the value of x after int x = 10; x = 2 + 3;?
A. 50

Document information

Uploaded on
November 22, 2026
Number of pages
81
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ProfessorNamesy
3.7
(13)
Sold
565
Followers
6
Items
1422
Last sold
5 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions