extends与super通配符的差异

副标题#e# 在定义泛型类型Generic的时候,也可以使用extends通配符来限定T的类型: publicclassGenericTextendsNumber{…} 现在,我们只能定义: GenericNumberp1=null; GenericIntegerp2=newGeneric(1,2); GenericDoublep3=null; 因为Number、Integer和Do

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部