定义一个泛型类,使用extends关键字限制该泛型的类型为List接口,并分别创建两个泛型对象。
class 泛型类<T extends List> { ... } 泛型类<ArrayList> a; 泛型类<List> b;