Private or protected constructors are generally used to restrict instantiation of a class to a single object. This is often done through the Singleton design pattern.
Private constructors can also be useful for:
classes containing only static utility methods
classes containing only constants
type safe enumerations
Links of further interest:
The Singleton pattern:
http://en.wikipedia.org/wiki/Singleton_pattern.
Private Constructors:
http://www.javapractices.com/Topic40.cjp
- Adam Kahtava [
http://adam.kahtava.com]