AP Computer Science A: actual Objective
Assessment Test |New update 2025
(2025 Updates)
Section 1: Primitive Types & Variables
1. What is the output of System.out.println(7 % 3 + 2 * 4);?
o A) 7
o B) 9
o C) 10
o D) 11
Answer: B) 9
Explanation: 7 % 3 = 1, 2 * 4 = 8, so 1 + 8 = 9.
Section 2: Using Objects
2. Which method is used to compare two String objects for equality?
o A) ==
o B) .equals()
o C) .compareTo()
o D) .charAt()
Answer: B) .equals()
Explanation: == checks memory addresses, not content.
Section 3: Boolean Expressions
, 2
3. What is the value of !(5 >= 3 || false) && true?
o A) true
o B) false
Answer: B) false
Explanation: 5 >= 3 is true, so true || false is true. !true is false, and false &&
true is false.
Section 4: Iteration
4. How many times does the loop execute?
java
Copy
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
o A) 4
o B) 5
o C) 6
o D) Infinite
Answer: B) 5
Explanation: Loop runs for i = 0, 1, 2, 3, 4 (5 iterations).
Section 5: Writing Classes
5. Which keyword is used to call a superclass constructor?