Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



In multiple inheritance , to create sub class object , is there need to create objects for its sup..

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

Post New Answer

More OOPS Interview Questions

what is a class

6 Answers  


What is an orthogonal base class?

2 Answers  


What are different oops concepts?

0 Answers  


Explain the concept of abstracion and encapsulation with one example. What is the difference between them?

3 Answers   PCS,


Name a typical usage of polymorphism

3 Answers  


How to call a non virtual function in the derived class by using base class pointer

3 Answers   HCL,


What is object in oop?

0 Answers  


Whats is abstraction in oops?

0 Answers  


What is cohesion in oop?

0 Answers  


what is a ststic variable and stiticfunction briefly explain with exmple and in which case we use

2 Answers   HCL,


What is abstraction with example?

0 Answers  


what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....

6 Answers  


Categories