Skip to content

Instantly share code, notes, and snippets.

@myeonginwoo
Created July 8, 2016 16:37
Show Gist options
  • Save myeonginwoo/f4a6fc3f838e4d91b0a04951c4c791e8 to your computer and use it in GitHub Desktop.
Save myeonginwoo/f4a6fc3f838e4d91b0a04951c4c791e8 to your computer and use it in GitHub Desktop.
public class Singleton {
private static Singleton singleton;
private Singleton(){
}
public Singleton getInstance(){
if(singleton == null)
singleton = new Singleton();
return singleton;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment