Created
September 26, 2019 21:34
-
-
Save ekoRemDev/b83e00d1459377a470fe97c85a500de4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class ClassName { | |
private static ClassName instance; | |
private ClassName(){ | |
// Private to prevent anyone else from instantiating | |
} | |
public static ClassName getInstance(){ | |
if(instance == null){ | |
instance = new ClassName(); | |
} | |
return instance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment