Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java singleton implementation

public class SingletonClass {
    private static final SingletonClass SINGLE_INSTANCE = new SingletonClass();
    private SingletonClass() {}
  public static SingletonClass getInstance() {
      return SINGLE_INSTANCE;
    }
}
Source by dzone.com #
 
PREVIOUS NEXT
Tagged: #java #singleton #implementation
ADD COMMENT
Topic
Name
6+6 =