Last active
June 2, 2020 13:48
-
-
Save bhawna94/dcbd8dd08039f02c2211fcffd52f7b57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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