Skip to content

Instantly share code, notes, and snippets.

@bhawna94
Last active June 2, 2020 13:48
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 bhawna94/dcbd8dd08039f02c2211fcffd52f7b57 to your computer and use it in GitHub Desktop.
Save bhawna94/dcbd8dd08039f02c2211fcffd52f7b57 to your computer and use it in GitHub Desktop.
class Singleton {
// Creating an Instance
private static Singleton object = new Singleton();
private Singleton() {}
public static Singleton getInstance() {
return object;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment