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 / sillu nu oru c coder
When a constructor is made private, object of that class
can not be created. That is called as Abstract class.
constructors can not be inherited. Moreover, when this
class is inherited, the base class object can not be
created. So we can not create the derived class object
also.
the above ans is irrelevant to the current situation,
here the thing is, a constructor cannot b private coz there
is no use of .
but if a situation occurs as such in the given prob, yes the
space is reserved for that useless private constructor.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is object in oop?
What is abstraction example?
What is multilevel inheritance in oop?
Why we use classes in oop?
What is the fundamental idea of oop?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
What is overloading and its types?
How to call a non virtual function in the derived class by using base class pointer
What is object and class in oops?
What is difference between oop and pop?
Get me an image implementation program.
What is difference between data abstraction and encapsulation?
What is polymorphism explain its types?
Which language is not a true object oriented programming language?