https://www.cnblogs.com/zhaoyibing/p/9051428.html
public class TestArrayList {
public static void main(String[] args) {
List<? super Animal> animal = new ArrayList<Animal>();
animal.add( new Dog() );
//Object a= animal.get( 0 );
Dog a1 = (Dog) animal.get( 0 );
a1.dog();
测试狗
Process finished with exit code 0
<? extends T>只能读取无法储存。 <? super T> 能储存,并读取,只是读取时会丧失原类型,需要强转。