Integer extends Number so why do I get the error at the bottom?
interface Predicate<T> {
public abstract boolean check(T t);
}
Predicate<? extends Number> predUpper = null;
predUpper.check(new Integer(73));
Error: The method check(capture#6-of ? extends Number) in the type Predicate is not applicable for the arguments (Integer)
I have read: Method in the type Map<String,capture#1-of ? extends Object> is not applicable and Difference between <? super T> and <? extends T> in Java