Sunday, November 30, 2008

Singleton Pattern

Singleton pattern governs the instantiation process. It is a type of creational pattern. Singleton proposes that at any time there can only be one instance of a singleton (object) . Implementation has two stpes:
Step 1: Provide a default Private constructor
Step 2: Create a Method for getting the reference to the Singleton Object
Singleton Implementation


Sample code that uses singleton object


Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home