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 : Explain Return type Return type : It is

    Return type: It is the declared type of a method, appearing instantly before the method name, like void in     public static void main(String[] args)    or Point[] in 

  • Q : Explain Global variable Global variable

    Global variable: It is a phenomenon which is more generally regarded as being a trouble in structured programming languages than in object-oriented languages. In structured programming language, like C or Pascal, a global variable is one stated outsid

  • Q : Who developed Extensible Hyper-Text

    Who developed Extensible Hyper-Text Markup Language? Answer: XHTML (Extensible Hyper-Text Markup Language) was developed by W3C HTML Working Group along with Steven

  • Q : Explain the differences among SEI

    What in your advice are the most important fundamental differences among SEI SW-CMM and ISO 9000-3?

  • Q : State HyperText Transfer Protocol

    HyperText Transfer Protocol: The HyperText Transfer Protocol (abbreviated as HTTP) is a set of rules stated to enable a Web client (that is, browser) to interact with the Web server.

  • Q : State the term snooping State the term

    State the term snooping?

  • Q : Define Container Abstractions Container

    Container Abstractions: Abstractions for containers (such as lists, stacks, sets, or queues) may represent just the state of a container—e.g., full or empty—and abstract away from the actual container content. The list operations also need

  • Q : Write a program using simple loop

    Objective:  The purpose of this problem is to gain experience with the principles necessary to write a program using simple loop, decision processing, counters and accumulators Save the Barns, a bi-partisan po

  • Q : Explain the relationship between XHTML

    Explain the relationship between XHTML and the Web?

  • Q : Define the term createWindow object

    Define the term createWindow object? Answer: reateWindow() physically makes the Window in memory  based upon the earlier registered WND

©TutorsGlobe All rights reserved 2022-2023.