AP Computer Science A Quiz
15 questions · no time limit
0:00
DATA COLLECTIONS
Question 1 of 15
No time limit
Current
Answered
Flagged
Not seen
In the given program, an ArrayList stores score objects, so it uses Integer wrapper types instead of primitive int. import java.util.ArrayList; public class ScoreTracker { public static void main(String[] args) { ArrayList<Integer> scores = new ArrayList<>(); scores.add(100); scores.add(50); int diff = scores.get(0) - scores.get(1); // unboxing System.out.println(diff); } }What is the purpose of using wrapper classes in this scenario?
YOUR PROGRESS
15
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F