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
Write a program to sort the number with different sorts in one program ??
when to use 'mutable' keyword and when to use 'const cast' in c++
What are the features of oop?
Can static class have constructor?
What are the 4 pillars of oop?
What are different oops concepts?
What is object in oop?
write knight tour problem which is present in datastructure
Whats is abstraction in oops?
What is abstraction in oop with example?
What is persistence in oop?
What are the components of marker interface?
How Do you Code Composition and Aggregation in C++ ?
How do you explain polymorphism?
Can main method override?