Code example for Enumeration

Methods: hasMoreElementsnextElement

0
  public boolean hasMoreElements() { 
    return first.hasMoreElements() || second.hasMoreElements();
  } 
 
  public T nextElement() { 
    if (first.hasMoreElements()) {
      return first.nextElement();
    } else { 
      return second.nextElement();
    } 
  } 
} 
Connect your IDE to all the code out there  Get Codota for Java