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 does sksksk mean in text slang?
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 the point of oop?
What is overloading in oop?
What is data binding in oops?
What is the main purpose of inheritance law?
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.
How do you answer polymorphism?
Can a destructor be called directly?
Which method cannot be overridden?
What do you mean by abstraction?
What is the purpose of enum?
What is abstraction and encapsulation?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
write string class as your own class in java without using any built-in function