Java SE 7 Programmer II (1Z0-804)
© examsiri.com
Question : 1 of 8
Marks:
+1,
-0
Given:
What is the result?
class MySort implements Comparator {
public int compare(Integer x, Integer y) {
 return y.compareTo(x);
}
}
And the code fragment:
Integer[] primes = {2, 7, 5, 3};
MySort ms = new MySort();
Arrays.sort(primes, ms);
for (Integer p2 : primes) {
 System.out.print(p2 + " ");
} What is the result?
Go to Question: