In the case of reference types, assigning a child object reference to the variable of the parent class type is called widening reference conversion or upcasting. The assigning of a parent class type reference to the variable of a child class type is called narrowing reference conversion or downcasting.
Widening and narrowing reference types
Widening
For example, if a class, SomeClass, extends SomeBaseClass, the following declaration and initialization are possible:
SomeBaseClass someBaseClass = new SomeBaseClass();
someBaseClass = new SomeClass();
And, since every class extends the java.lang.Object class by default, the following declarations and initializations are possible too:
Object someBaseClass = new SomeBaseClass();
someBaseClass...