java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.ClassCastException
- All Implemented Interfaces:
Serializable
This runtime exception is thrown when a program attempts to cast an object
to a type with which it is not compatible.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance of this class with its walkback filled in.ClassCastException
(String detailMessage) Constructs a new instance of this class with its walkback and message filled in. -
Method Summary
Methods declared in class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ClassCastException
public ClassCastException()Constructs a new instance of this class with its walkback filled in. -
ClassCastException
Constructs a new instance of this class with its walkback and message filled in.- Parameters:
detailMessage
- String The detail message for the exception.
-