123456789101112131415



Question 1: class Test{
public static Iterator reverse(List list) {
Collections.reverse(list);
return list.iterator();
}
public static void main(String[] args) {
List list = new ArrayList();
list.add("1"); list.add("2"); list.add("3");
for (Object obj: reverse(list))
System.out.print(obj + ", ");
}
}

What is the result?

1. 3, 2, 1,
2. 1, 2, 3,
3. Compilation fails.
4. The code runs with no output.