Can we have a private constructor ?
Answer Posted / aj
Yes, only if we want to prevent instantiation from other
class, but then the class itself cannot be sub classed.
this the heart of singleton design pattern
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is difference between data abstraction and encapsulation?
What is cohesion in oop?
What is abstract class in oop?
Get me an image implementation program.
What do you mean by variable?
Is html an oop?
What is basic concept of oop?
why reinterpret cast is considered dangerous?
What is a class oop?
What is overloading in oop?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
How do you achieve polymorphism?
• What are the desirable attributes for memory managment?
What is methods in oop?
officer say me - i am offered to a smoking , then what can you say