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
What is encapsulation process?
What is the difference between a mixin and inheritance?
2. Give the different notations for the class.\
What is polymorphism and example?
What is abstraction example?
What is overloading in oops?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What is the difference between encapsulation and polymorphism?
Which is not an object oriented programming language?
What is multilevel inheritance?
What does no cap mean?
What is encapsulation oop?
How oops is better than procedural?
What are classes oop?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.