Let's suppose I'm writing a methods which takes as parameter a list of any type of Number or its subclasses. The following signature works fine:
public void method(List<? extends Number> list) {
(...)
}
However, the following signature also works:
public void method(List<Number> list) {
(...)
}
Is there any case where "? extends" is really needed in method signature?