Why would you want objects of your class to only be created internally? This could be done for any reason, but one possible reason is that you want to implement a singleton. A singleton is a design pattern that allows only one instance of your class to be created, and this can be accomplished by using a private constructor.The singleton pattern is one of the simplest design patterns: it involves only one class which is responsible to instantiate itself, to make sure it creates not more than one instance; in the same time it provides a global point of access to that instance.
Liked By
Write Answer
Private constructors can be used in the singleton design pattern
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
23-Feb-2015