Use Design Pattern Singleton in Java to control the heap overflow

Design Pattern Singleton in Java

Singletons are useful to provide a unique source of data or functionality to other Java Objects. Design pattern singleton is used to control the heap overflow. It limits the user to create one object for a particular class. If we need to add more functionalities then we can create more objects.

 

(more…)