
public class ClassCast
{
   //-----------------------------------------------------------------
   //  Deliberately try to cast one class to another to cause an exception.
   //-----------------------------------------------------------------
   public static void main (String[] args)
   {
       Object x = new Integer(0);    // must use object here
       //Integer x = new Integer(0); // this causes a compile error
		
       System.out.println((String)x);

       System.out.println ("This text will NOT be printed.");
   }
}
