Answer:
Singleton pattern ensures a class has only one instance & provide a global point of access to it. It is achieved by declaring a static variable for the class & checking for null before actually instantiating it.
Asked In: Many Interviews |
Alert Moderator