Cannot instantiate the type List<Integer>

来源:互联网 发布:linux c 绝对路径 编辑:程序博客网 时间:2024/05/29 00:32

在使用java.util.List; 的时候,把语句写成了:

List<Integer> arr = new List<Integer>();

导致错误:

Cannot instantiate the type List<Integer>

正确写法是:

List<Integer> arr = new ArrayList<Integer>();

4 0
原创粉丝点击