Explain Downcast with example

Explain Downcast with example: It is a cast towards an object's dynamic kind - that is, `down' the inheritance hierarchy. For illustration:

       // Downcast from Object to String
        String s = (String) o;

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.