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 / veena
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.
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is polymorphism in oop example?
What is the diamond problem in inheritance?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
How do you define social class?
Which method cannot be overridden?
what type of question are asked in thoughtworks pair programming round ?
What is polymorphism in oops with example?
Can an interface inherit a class?
Explain the concepts involved in Object Oriented programming.
What type of loop is a for loop?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
which feature are not hold visual basic of oop?
What is advantage of inheritance?
Can abstract class have normal methods?
What is the difference between inheritance and polymorphism?