Welcome 微信登录

首页 / 软件开发 / JAVA / java.util.List:Cannot instantiate the type List<Integer>

java.util.List:Cannot instantiate the type List<Integer>2015-02-09在使用java.util.List; 的时候,把语句写成了:

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

导致错误:

Cannot instantiate the type List<Integer>

正确写法是:

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