Singleton Class and Private Constructor in Java : Free Java Tutorials
For any Java class, if we are allowed to create only one object, then such type of class is called a singleton class. For example, Runtime and ServiceLocator are singleton classes. We can implement a Singleton class using a private constructor. The advantage of Singleton class: Memory utilization and Performance improvement If several people have …
Singleton Class and Private Constructor in Java : Free Java Tutorials Read More »