AP Computer Science A Quiz
20 questions · no time limit
0:00
DATA COLLECTIONS
Question 1 of 20
No time limit
Current
Answered
Flagged
Not seen
PASSAGE
public class Swapper { // Precondition: 0 <= i < list.size(), 0 <= j < list.size() public static void swap(ArrayList<Integer> list, int i, int j) { Integer temp = list.get(i); list.set(i, list.get(j)); list.set(j, temp); } }
An ArrayList named data contains [5, 10, 15, 20]. What are the contents of data after the call Swapper.swap(data, 1, 3)?
YOUR PROGRESS
20
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