Cannot instantiate the type List

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

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

导致错误:

Cannot instantiate the type List<Integer>

正确写法是:

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

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!http://www.captainbed.net

猜你喜欢

转载自www.cnblogs.com/skiwndhed/p/10470078.html