码迷,mamicode.com
首页 > 其他好文 > 详细

Cannot instantiate the type List<Integer>

时间:2014-08-09 21:35:49      阅读:304      评论:0      收藏:0      [点我收藏+]

标签:java   list   arraylist   instantiate   异常   

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

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

导致错误:

Cannot instantiate the type List<Integer>

正确写法是:

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

Cannot instantiate the type List<Integer>,布布扣,bubuko.com

Cannot instantiate the type List<Integer>

标签:java   list   arraylist   instantiate   异常   

原文地址:http://blog.csdn.net/testcs_dn/article/details/38459211

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!