For example, the validation method in java.util.Collections
public static <T> int binarySearch(List<? extends T> list, T key, Comparator<? super T> c)
Why can I define it as follows:
public static <T> int binarySearch(List<T> list, T key, Comparator<T> c)
Why does this not work in java?
source share