> What is worse that can happen if we dont declare
> private constructor in a class, if it contains only
> static members
Usually you dont declare consturctor as private. declaring constructors
as private means that no other class can create its instance.
You declare constructor as private, when you need to, in certain design
patterns such as singelton pattern. You declare the constructor as a
private and provide a method to get its instance.
Whatever you are talkling about in your question, if you just have a private constructor, then theres no meaning of having that class.
> what are you talking about?
When one creates a class with only static methods and data members and instances of the class should never be created then it is normal to provide a private default constructor to stop instances being created.
What is the worst that can happen when the private constructor is not provided and someone creates an instance? No big deal but it does waste a small a bit of memory and small bit of CPU time!
P.S. My mindreading skills are well tuned today!