Type safety: The method add(Object) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized Eclipse中以下代码在.add方法被调用时会出现警告(warnings)
这是因为JDK 1.5版本的新功能,需要对List,Vector之类定义时候,最好进行泛化。 2 T(或者E)就是一个类的类型,比如Double,Object等 |
Type safety: The method add(Object) belongs to the raw type ArrayList
最新推荐文章于 2021-03-05 04:29:55 发布