Package java.util
Class NoSuchElementException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.util.NoSuchElementException
-
- All Implemented Interfaces:
Serializable
public class NoSuchElementException extends RuntimeException
Thrown by thenextElementmethod of anEnumerationto indicate that there are no more elements in the enumeration.- See Also:
Enumeration,Enumeration.nextElement(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NoSuchElementException()Constructs aNoSuchElementExceptionwithnullas its error message string.NoSuchElementException(String s)Constructs aNoSuchElementException, saving a reference to the error message stringsfor later retrieval by thegetMessagemethod.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, toString
-
-
-
-
Constructor Detail
-
NoSuchElementException
public NoSuchElementException()
Constructs aNoSuchElementExceptionwithnullas its error message string.
-
NoSuchElementException
public NoSuchElementException(String s)
Constructs aNoSuchElementException, saving a reference to the error message stringsfor later retrieval by thegetMessagemethod.- Parameters:
s- the detail message.
-
-