Code example for NoSuchElementException

0
	public boolean hasNext() { 
		return false; 
	} 
 
	public T next() { 
		throw new NoSuchElementException("Iterator contains no elements"); 
	} 
 
	public void remove() { 
		throw new UnsupportedOperationException(); 
	} 
 
}