Child cObj = new Parent()
Wahts the output ?
Answer Posted / bhavin pandya
It will give yo Error :-
Object reference not set to an instance of an object.
If you want to create object then
Child cObj = new Child()
this is the right way
| Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
Can bst contain duplicates?
Why do we use polymorphism in oops?
Get me a number puzzle game-program
What is encapsulation and abstraction? How are they implemented in C++?
What is multilevel inheritance explain with example?
What is difference between data abstraction and encapsulation?
what are the different types of qualifier in java?
What are the 3 principles of oop?
What is polymorphism what are the different types of polymorphism?
What is polymorphism explain its types?
Can a varargs method be overloaded?
What is the main feature of oop?
What is object in oop?
What is a superclass in oop?
What is overloading in oops?