在使用List链表存储一组对象时,发现链表提示不能显示参数化的错误,即标题提示的错误:“List类型不是通用的; 不能使用参数 < P e o p l e > <People> <People>进行来进行参数化”。查找原因发现是由于应用了错误的包。将import java.awt.List;里面的List引用过来了,这里应该使用import java.unit.List;
The type List is not generic; it cannot be parameterized with arguments <People>
最新推荐文章于 2021-03-28 21:18:34 发布