What is the result of the following?
Comparator<Integer> c = (x, y) -> y-x; List<Integer> ints = Arrays.asList(3, 1, 4); Collections.sort(ints, c); System.out.println(Collections.binarySearch(ints, 1));
D.
A custom sort order is specified using a Comparator to sort in descending order.
However, this Comparator is not passed when searching.
When a different sort order is used for searching and sorting, the result is undefined.
Option D is correct.