BlackBerry interview question

Private constructor

Interview Answer

Anonymous

Jun 9, 2011

Singleton design pattern. You declare a method, getInstance(), which enforces a rule that the class in question can be instantiated ONLY once. If it has not been instantiated, the public getInstance() will then invoke the private constructor which it has access to