Skip to content

Instantly share code, notes, and snippets.

@choiseungho
Created September 21, 2015 04:27
Show Gist options
  • Save choiseungho/73412bab756d35d86004 to your computer and use it in GitHub Desktop.
Save choiseungho/73412bab756d35d86004 to your computer and use it in GitHub Desktop.
정적 팩토리를 이용한 Singleton
package com.tistory.seungdols.effetive.ex_1;
/**
* @PROJECT effectiveJava
* @PACKAGE com.tistory.seungdols.effetive.ex_1
* @WRITTER Administrator
* @DATE 2015-09-21
* @HISTORY
* @DISCRIPT
*/
public class SingletonPattern {
//정적 팩토리를 이용한 Singleton
private static final SingletonPattern INSTANCE = new SingletonPattern();
private SingletonPattern(){}
public static SingletonPattern getInstance()
{
return INSTANCE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment