Which design pattern ensures that only one object of particular class gets created?
(a) Singleton pattern
(b) Filter pattern
(c) State pattern
(d) Bridge pattern
(a) Singleton pattern
(b) Filter pattern
(c) State pattern
(d) Bridge pattern
Right answer is (a) Singleton pattern
To elaborate: Singleton pattern involves a single class which is responsible to create an object while making sure that only one object gets created. This class provides a way to access the only object which can be accessed directly without need to instantiate another object of the same class.