FileDocCategorySizeDatePackage
ClassCast.javaAPI DocExample717Sat Nov 25 12:55:40 GMT 2000None

ClassCast

public class ClassCast extends Object
Class Casting Demo.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)


		A anA = new A();
		B aB = new B(1);
		C aC = new C(2,3);

		System.out.println("A = " + anA);
		System.out.println("B = " + aB);
		System.out.println("C = " + aC);

		A aCast = aC;
		System.out.println("aCast = " + aCast);

		C anotherC = (C) aCast;
		System.out.println("anotherC = " + anotherC);