Demonstrates how RTTI enforces type safety.
A a = null;
A a1 = new A();
B b = new B();
C c = new C();
a = (A)b; // no problem
b = (B)a; // still no problem, casting back to what it was created as.
a = a1; // Same type so no problem
Object d = (Object)c; // no problem becasue of implicit inheritance
c = (C)d; // casting back