Example
public
class
ClassA
implements
Iterator{
public Object
next() {
//...
}
public boolean
hasNext() {
next();
//...
}
public void
remove() {
//...
}
Solution
Reconsider the use of the method invocation next()