<? super T>表示包括T在内的任何T的父类,<? extends T>表示包括T在内的任何T的子类;请记住PECS原则:生产者(Producer)使用extends,消费者(Consumer)使用super.原文地址:http://mp.weixin.qq.com/s?__biz=MjM5MTM0NjQ2MQ==&mid=400507472&idx=1&sn=446bdb30c96798bb177cc2e1941008a1&scene=23&…
(1)<? super String> is any class which is a superclass of String (including String itself). (In this case, the only other suitable class is Object.) 即包括String的父类和它本身的类. (2) <? extends String> (which in this specific case wouldn't be very usefu…
E – Element (在集合中使用,因为集合中存放的是元素) T – Type(Java 类) K – Key(键) V – Value(值) N – Number(数值类型) ? – 表示不确定的java类型(无限制通配符类型) S.U.V – 2nd.3rd.4th types Object – 是所有类的根类,任何类的对象都可以设置给该Object引用变量,使用的时候可能需要类型强制转换,但是用使用了泛型T.E等这些标识符后,在实际用之前类型就已经确定了,不需要再进行类型强制转换. ?…