You are confusing objects and types.
Unlike simple general parameters, wildcards describe the type of general parameter.
A List<? super Number> List<? super Number> not a list of superclasses of Number ; this is a list of an unknown type, where this type is the superclass of a number.
A LinkedList<?> Could be a LinkedList<Car> .
Since Object not a Car , you cannot add an Object to it.
In fact, since you know nothing about what type the list contains, you cannot add anything to it. (except null )
Similarly, LinkedList<? extends Number> LinkedList<? extends Number> may be a List<Long> , so you cannot add Integer to it. (since Integer not Long )
On the other hand, List<? super Number> List<? super Number> definitely allowed to contain Number or any derived class, as it can only be a list of one of the Number superclasses (e.g. List<Object> )
SLaks source share