In multiple inheritance , to create sub class object , is
there need to create objects for its superclasses???
in java and c++ both. Actually i have some information that
is , all available members from its superclasses , memory
created in subclass obj , so no need to create object for
its superclasses...???
Thanks in Advance
Answer / abhishek
Hi,
There is no need to create an object of the base class, if you want to create an object of the derived class. It is automatically created internally. When you create an object of the derived class then, the constructor of the base class is called first and then the constructor of the derived class. Hence, depending upon the scope specified by access specifiers, we can directly the use the members of the Base class using the object of the Derived class.
| Is This Answer Correct ? | 1 Yes | 0 No |
What is the use of fflush(stdin) in c++?
1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)
Why a "operator=(...)" when there is a copy ctor?
can main method be overloaded...??? How..????
What are classes oop?
Where is pseudocode used?
What are the benefits of oop?
Can we create object of interface?
Explain the concept of abstracion and encapsulation with one example. What is the difference between them?
Program to print 0 to 9 in cross order
Explain the concepts involved in Object Oriented programming.
features of OOPS
22 Answers Ness Technologies, Satyam,