java.util
Class EmptyStackException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.util.EmptyStackException
-
public class EmptyStackException extends RuntimeException
AnEmptyStackException
is thrown if the pop/peek method of a stack is executed on an empty stack.- See Also:
RuntimeException
-
-
Constructor Summary
Constructors Constructor and Description EmptyStackException()
Constructs a newEmptyStackException
with the stack trace filled in.EmptyStackException(String detailMessage)
Constructs a newEmptyStackException
with the specified detail message.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
fillInStackTrace, getMessage, getStackTrace, printStackTrace, printStackTrace, toString
-
-
-
-
Constructor Detail
-
EmptyStackException
public EmptyStackException()
Constructs a newEmptyStackException
with the stack trace filled in.
-
EmptyStackException
public EmptyStackException(String detailMessage)
Constructs a newEmptyStackException
with the specified detail message.- Parameters:
detailMessage
- the detail message for this exception.
-
-