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
Advantage and disadvantage of routing in telecom sector
What is the purpose of enum?
What are the 4 main oop principles?
What is oops?what is its use in software engineering?
Which is not an object oriented programming language?
What is difference between oop and pop?
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?
Why multiple inheritance is not allowed?
What exactly is polymorphism?
What is solid in oops?
Get me an image implementation program.
What are the 5 oop principles?
What is data binding in oops?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is difference between data abstraction and encapsulation?