123456789101112131415



Question 1: import java.util.*;
public class SortOf {
public static void main(String[] args) {
ArrayList<Integer> a = new ArrayList<Integer>();
a.add(1); a.add(5); a.add(3);
Collections.sort(a);
a.add(2);
Collections.reverse(a);
System.out.println(a);
}
}

What is the result?

1. [1, 2, 3, 5]
2. [2, 1, 3, 5]
3. [2, 5, 3, 1]
4. [5, 3, 2, 1]