热门

最新

红包

立Flag

投票

同城

我的

发布
qq_38338409
猿小陆
4 年前
trueqq_38338409

关于泛型,这代代码有什么问题?
public class Demo2 {
public static <T> void test(List<Object> list){
System.out.println(list);
}
public static void main(String[] args) {
List<String> list1 = new ArrayList<>();
test(list1);
}
}

CSDN App 扫码分享
分享
1
1
打赏
  • 复制链接
  • 举报
下一条:
1
立即登录