Child cObj = new Parent()
Wahts the output ?
Answer Posted / chetan
it will execute without an error. if Parent class is
parent/base class and child is the child/drive class which
inherit parent class.
In the other worlds you are invoking drive class method with
the reference of base class.
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
explain sub-type and sub class? atleast u have differ it into 4 points?
What are the important components of cohesion?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What is solid in oops?
What is the difference between static polymorphism and dynamic polymorphism?
Why polymorphism is used in oops?
Which is not an object oriented programming language?
What does no cap mean?
How can you overcome the diamond problem in inheritance?
Why do we need oop?
What is destructor example?
What are two types of polymorphism?
What is encapsulation with real life example?
What is oops?what is its use in software engineering?
What are different oops concepts?