Packages This Package Prev Next Index
public class java.lang.ClassCastException extends java.lang.RuntimeException (I-§1.42) { // Constructors public ClassCastException(); §1.27.1 public ClassCastException(String s); §1.27.2 }Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:
Object x = new Integer(0);
System.out.println((String)x);
public ClassCastException()
public ClassCastException(String s)
s
-
the detail message
Packages This Package Prev Next IndexJava API Document (HTML generated by dkramer on April 22, 1996)