Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Which pattern prevents one from creating more than one instance of a variable ?

Which pattern prevents one from creating more than one instance of a variable ?

A. Factory Method
B. Singleton
C. Observer
D. None of the mentioned

Explanation: In singleton pattern, the class itself is made responsible for keeg track of its instance.Thus it ensures that no more than one instance is created.