关于java List的一个问题解决 - the type list is not generic
来源:互联网 发布:房地产大数据 编辑:程序博客网 时间:2024/06/02 17:04
在使用List的时候出现了错误, List<Users> userList = new ArrayList<Users>(); 提示Type list is not generic, 在网上搜索一翻, 大部分都是说需要引入
import java.util.List 和import java.util.ArrayLis,另外要注意jdk版本问题,至少是1.5才支持泛型。
那两步走,
1.分别引入包 -在文件顶部加入两行代码
import java.util.List;
import java.util.ArrayLis;
2.再设置版本-
右键properties ->java compiler -> 选择JDK compliance 为1.5. 这样还没完,要深入进去,否则错误还是存在的(我就是费了半天劲)。
要确保JRE的安装目录,如下图:
- 关于java List的一个问题解决 - the type list is not generic
- The type List is not generic
- List错误;The type List is not generic
- The type List is not generic; it cannot be parameterized with arguments
- The type List is not generic; it cannot be parameterized with arguments
- The type List is not generic; it cannot be parameterized with arguments
- The type List is not generic
- The type List is not generic; it cannot be parameterized with arguments <Integer>
- the type List is not generic; it cannot be parameterized with arguments<T>解决办法
- 解决错误The type List is not generic; it cannot be parameterized with arguments <Map>
- The type List is not generic; it cannot be parameterized with arguments<T>
- The type List is not generic; it cannot be parameterized with arguments***
- List is a raw type. References to generic type List<E> should be parameterized
- Type safety: Unchecked invocation sort(List<Cell>) of the generic method sort(List<T>) 问题
- 关于"The parameter list is too long"错误的原因
- The type JComboBox is not generic; it cannot be parameterized with arguments <String>错误
- How to: Implement CopyToDataTable<T> Where the Generic Type T Is Not a DataRow
- java.lang.IllegalStateException: The display list is not valid. 错误分析
- Notes about Porting suspend-to-disk function to android
- UIView的drawRect方法
- poj 2299 Ultra-QuickSort (树状数组解法)
- 【386w.com】一键启动电脑应用程序不再是梦想
- java传集合到oracle的存储过程中
- 关于java List的一个问题解决 - the type list is not generic
- regex.h - 正则表达式
- File类的简单使用
- MYSQL常用操作命令
- scanf易错点解析
- listview中图片的异步加载,双缓存
- Android程序联网
- chrome下用javascript调用download函数出错
- PHP实践之路(二)apache虚拟主机配置