Code example for Iterator

Methods: hasNext

0
    myIterator = iterable.iterator();
  } 
 
  @Override 
  public boolean hasMoreElements() { 
    return myIterator.hasNext();
  } 
 
  @Override 
  public E nextElement() { 
    return myIterator.next();
  } 
}