The declaration List<? super B> list
says that list
is a List
of objects of some type that B inherits from. But this type need not be compatible with A
. Suppose the hierarchy had been:
public class A {...}
public class C extends A {...}
public class B extends C {...}
Then, list
could be a List<C>
. But then list.add(new A())
is illegal. An instance of A
is not an instance of C
. The compiler only knows that instances of B
or a subclass can be added to list
.