Question: 36
(Choose 1 answer)
What is the output of the following code?
ArrayList list new ArrayList();
list.add(5);
list.add(3);
list.add(1);
list.add(2);
list.add(5);
Collections.reverse(list);
Collections.sort(list);
System.out.println(list);
A. [1, 2, 3, 5, 5]
B. [1, 2, 5, 3, 5]
C. [5, 5, 3, 2, 1]
D. [5, 3, 1, 2, 5]