Package java.util
Class NoSuchElementException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.util.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 Summary
Constructors Constructor Description NoSuchElementException()Constructs a newNoSuchElementExceptionwith the current stack trace filled in.NoSuchElementException(String detailMessage)Constructs a newNoSuchElementExceptionwith the current stack trace and message filled in. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NoSuchElementException
public NoSuchElementException()Constructs a newNoSuchElementExceptionwith the current stack trace filled in. -
NoSuchElementException
Constructs a newNoSuchElementExceptionwith the current stack trace and message filled in.- Parameters:
detailMessage- the detail message for the exception.
-