java.lang
Class ClassCastException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.ClassCastException

public class ClassCastException
extends RuntimeException

Thrown when an attempt is made to cast an object which is not of the appropriate runtime type. For example:

 Object o = new Vector();
 String s = (String) o;
 


Constructor Summary
ClassCastException()
          Create an exception without a message.
ClassCastException(String s)
          Create an exception with a message.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, getMessage, initCause, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassCastException

public ClassCastException()
Create an exception without a message.


ClassCastException

public ClassCastException(String s)
Create an exception with a message.

Parameters:
s - the message