When a private constructer is being inherited from one
class to another class and when the object is instantiated
is the space reserved for this private variable in the
memory??
Answer Posted / balakishore
before invoking derived class constructor base-class
constructor should be called.
1. first base-class object will be created then derived-
class object will be created.
2. here the base class constructor is private, so derived-
class cannot invoke it.
No object is created in derived-class.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is difference between data abstraction and encapsulation?
What are the two different types of polymorphism?
Which type does string inherit from?
What is encapsulation with real life example?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is polymorphism programming?
What is super in oop?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is class and object with example?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is class in oop with example?
What is the oops and benefits of oops programming?
What is a function in oop?
Can we have inheritance without polymorphism?