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 inheritance and polymorphism?
• What are the desirable attributes for memory managment?
How do you answer polymorphism?
What is the point of polymorphism?
Whats oop mean?
What are the 4 pillars of oop?
What is polymorphism in oops with example?
Can abstract class have normal methods?
Please send ford technologies placement paper 2 my mail id
What are the benefits of oop?
What is the problem with multiple inheritance?
Why multiple inheritance is not allowed?
What language is oop?
What is static in oop?
What is constructor overloading in oop?