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
Can bst contain duplicates?
When not to use object oriented programming?
What do you mean by overloading?
Why is polymorphism needed?
What are benefits of oop?
What is difference between multiple inheritance and multilevel inheritance?
What is encapsulation oop?
What does it mean when someone says I oop?
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
What is abstraction in oop with example?
What is overloading in oops?
what are the realtime excercises in C++?
What is the problem with multiple inheritance?
What are the 4 main oop principles?
What is difference between data abstraction and encapsulation?