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

The type of the expression must be an array type but it resolved to List<Vertex>

时间:2018-05-06 22:17:48      阅读:993      评论:0      收藏:0      [点我收藏+]

标签:art   express   imp   java   import   关于   使用   must   The   

正常使用 list List<Vertex> vertices = new ArrayList<Vertex>;

但是报错 The type of the expression must be an array type but it resolved to List<Vertex>

原因:

应该导入 :import java.util.*;

同时检查一下有没有 import 其他的 List.比如 java.awt.List。有的话,去掉。

这里有一篇关于java.util.List;与java.awt.List;的区别

https://blog.csdn.net/haiyoung/article/details/50719282

The type of the expression must be an array type but it resolved to List<Vertex>

标签:art   express   imp   java   import   关于   使用   must   The   

原文地址:https://www.cnblogs.com/blairwaldorf/p/8999754.html

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