Below code :
List extends String> genericNames = new ArrayList();
genericNames.add(\"John\");
Gives compiler error :
Just want to add to the answer of GanGnaMStYleOverFlow that you can add an object of any subtype of Animal to the following list:
List animals = new ArrayList();
You should use such list whenever you think that it can contain any kind of animals.
On the other hand, you should use List extends Animal> when you want to specify that the list contains some kind of animal but you don't know which one. Since you don't know what kind of animals are there, you cannot add any.