Singleton
Singleton is a type of software design pattern that restricts the instantiation of a class to one, and only one, single instance.
Example
The
java.lang.Runtime.getRuntime
static method, part of the Java library, returns a singleton.
Singleton is a type of software design pattern that restricts the instantiation of a class to one, and only one, single instance.
The
java.lang.Runtime.getRuntime
static method, part of the Java library, returns a singleton.