Dado el siguiente código, cuál crees que será el resultado y por qué?
import java.util.*;
import static java.util.Collections.sort;
class SimulatorExamBQ62Mangle {
public static void main(String[] args) {
List x = new ArrayList();
x.add(5);
x.add(new Integer(42));
x.add(new Integer("17"));
x.add(new Integer(812).longValue());
sort(x);
System.out.println(x);
}
}
a. [17, 42, 5, 812]
b. [5, 17, 42, 812]
c. [5, 42, 17, 812]
d. Error en compilación
e. Una exception es lanzada en tiempo de ejecución