泛型? extents super

?可以接受任何泛型集合,但是不能编辑集合值。所以一般只在方法参数中用

例子:

? extends Number  则类型只能是Number类的子孙类

? super String  则类型只能是String父类

原文地址:https://www.cnblogs.com/ly-china/p/5434924.html