Child cObj = new Parent()
Wahts the output ?

Answer Posted / austin j seelan

Child cObj = new Parent()
This will through the compiletime error.
but we can create an instance like the foll.way
parent objparent = new child()

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is and I oop mean?

622


What is the difference between abstraction and polymorphism?

617


can we make game by using c

3429


Why do we use polymorphism?

579


What is oops with example?

566






What are the benefits of polymorphism?

624


What is polymorphism used for?

574


What is oops?what is its use in software engineering?

557


What do you mean by variable?

577


What exactly is polymorphism?

610


What is abstraction in oops?

589


What are the data types in oop?

608


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1459


What is the example of polymorphism?

560


What does I oop mean?

618