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
Where You Can Use Interface in your Project
Why is static class not inherited?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
What is the difference between a constructor and a destructor?
What are the benefits of interface?
Templates mean
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.
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
What is abstraction with example?
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 polymorphism in oop example?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What is inheritance and how many types of inheritance?
Please send ford technologies placement paper 2 my mail id
What is overloading and its types?