Skip to content

Instantly share code, notes, and snippets.

@ShwetaChauhan18
Last active September 2, 2018 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShwetaChauhan18/ed47d6296848a2889f20e4a8fb95dd00 to your computer and use it in GitHub Desktop.
Save ShwetaChauhan18/ed47d6296848a2889f20e4a8fb95dd00 to your computer and use it in GitHub Desktop.
public class Singleton {
private static Singleton mSingleton = new Singleton(); //instance will be created at load time
private Singleton(){}
public static Singleton getInstance() {
return mSingleton;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment