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

  • Q : Define the term Runtime error Define

    Define the term Runtime error: It is an error which causes a program to finish whenever it is being run.

  • Q : What are the examples of microkernel

    What are the examples of microkernel?

  • Q : Define Final variable Final variable :

    Final variable: A variable with final reserved word in its declaration. The final might not assigned to once it has been initialized. Initialization frequently occurs as a part of its declaration. Though, the initialization of an uninitialized final f

  • Q : State the term multi threading State

    State the term multi threading.

  • Q : Mission Critical Systems or a real-time

    Determine the important aspect of Mission Critical Systems or a real-time system.

  • Q : Explain Abstract Windowing Toolkit

    Abstract Windowing Toolkit: The Abstract Windowing Toolkit (AWT) offers a collection of classes which simplify the creation of applications with the GUI (graphical user interfaces). Such are to be found in the java.awt packages. Included are classes f

  • Q : Define Well-known port Well-known port

    Well-known port: It is a port number at which a server provides a familiar service. For example, 80 is well-known port number for the servers employing the HyperText Transfer Protocol (abbreviated as HTTP).

  • Q : Describe Software reuse Software reuse

    Software reuse: It is the ability to reuse software components in various contexts. The object-oriented languages aid to encourage reuse by their support of encapsulation.

  • Q : Which kernel objects is utilize for

    Which kernel objects is utilize for thread Synchronization on various processes? Answer: For thread synchronization on various processes kernel objects are utilize

  • Q : Function overloading in C plus Function

    Function overloading in C++: The function name containing numerous definitions which are differentiable by the number or kinds of their arguments is termed as function overloading.

©TutorsGlobe All rights reserved 2022-2023.