标签:list java泛型 new 泛型 ret bsp date ati string
public class A <T> extends B <List<T>>{
private int b;
}
public class B<T> {
private T date;
public T getDate() {
return date;
}
public void setDate(T date) {
this.date = date;
}
}
public class C {
public static void main(String[] args) {
A<String> a = new A<String>();
List<String> list = a.getDate();
}
}
给A提供类型就相当于给T date;提供类型
标签:list java泛型 new 泛型 ret bsp date ati string
原文地址:https://www.cnblogs.com/flz-0429/p/9860781.html