The use of private constructor is to serve singleton classes . A singleton class is one which limits the number of objects creation to one. Using private constructor we can ensure that no more than one object can be created at a time.
The use of private constructor is to serve singleton classes . A singleton class is one which limits the number of objects creation to one. Using private constructor we can ensure that no more than one object can be created at a time.