Created
February 12, 2022 17:08
-
-
Save Ankit-Slnk/653dea80d153610c62d589db0c0e2988 to your computer and use it in GitHub Desktop.
code to create singleton class in android java
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
private static final ClassName ourInstance = new ClassName(); | |
public static ClassName getInstance() { | |
return ourInstance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment