我使用 Eclipse 3.1M4 进行如下编码时:
class Test implements Iterator<Integer> {
public boolean hasNext() { return false; }
public Integer next() { return null; }
public void remove() {}
}
问题出现在 next() 方法,上面显示编译器警告:
Type safety: The return type Integer of the method next() of type Test needs unchecked conversion to conform to the return type E of inherited method
这是一个Eclipse的Bug
上一篇: Java网络编程的学习笔记(二)
下一篇: JDK1.5 最新特性
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




