Your co-variant understanding is correct, but usasge is not. List<SubChild> does not match List<SuperChild>
Consider this, List<Animals> does not match List<Dogs> , and everything can go horribly wrong if it was allowed. A Dog is Animal , but if it was allowed to assign, as shown below:
List<Dogs> dogs = new ArrayList<Dogs>(); List<Animals> animals = dogs;
what will happen when you add a cat?
animals.add(new Cat());
and
Dog dog = dogs.get(0);
Therefore, it is not allowed.
As many others have said, use List<? extends SuperChild> List<? extends SuperChild> as a return type to solve your problem.
EDIT To your comment above, if you don't have control over the superclass, I'm afraid you can't do anything.
source share