Java: polymorphic - a variable declared as maintaining a value of one class can be holding a value derived from a child class.
In both Java and C++, it is legal to assign a value derived from class B to a variable declared as holding an instance of class A.
A instanceOfA; // declare instances of
B instanceOfB; // class A and B
instanceOfA = instanceOfB;