Constructors by default are public..
They can be declared as private in case of the singleton classes and also if the class contain all the constants.singleton classes are those for whom only one object could be made.
In this case when you try making the second object it displays an error..
They can be declared as private in case of the singleton classes and also if the class contain all the constants.singleton classes are those for whom only one object could be made.
In this case when you try making the second object it displays an error..