To solve a few commonly faced problems in the computer science world, a few smart people invented design patterns - Singleton is one of them. It is the simplest of all the creational patterns. The patterns are called as creational design patterns, as they are related to object creation. As the name suggests, in this pattern, there can only be a single object of a class throughout the application life cycle.
What?! What on earth would we need only one object? How can we even restrict a class to ...
Published on May 28, 2020 10:03