JAVA泛型笔记

泛型:


泛型类格式:public class {   }
泛型方法格式:public void method(T num){   }
泛型接口格式:Interface inte {    }

 

泛型通配符:
--->指的是当前参数类型是A或者是A的子类
   --->指的是当前参数类型是B类或是B的父类

你可能感兴趣的:(笔记)