Explain Upcast

Upcast: It is a cast towards an object's ultimate super type - which is, `up' the inheritance hierarchy towards the Object class, for example:

        // Upcast from VariableController to HeaterController
        VariableController v;
        ...
        HeaterController c = v;

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.