Package java.util

Class NoSuchElementException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InputMismatchException

public class NoSuchElementException
extends RuntimeException
Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
See Also:
Serialized Form
  • Constructor Details

    • NoSuchElementException

      public NoSuchElementException()
      Constructs a new NoSuchElementException with the current stack trace filled in.
    • NoSuchElementException

      public NoSuchElementException​(String detailMessage)
      Constructs a new NoSuchElementException with the current stack trace and message filled in.
      Parameters:
      detailMessage - the detail message for the exception.