Last active
December 3, 2018 12:30
-
-
Save Bahaaib/c3b9dcbd29e2b504f004fa61741ad8f5 to your computer and use it in GitHub Desktop.
Bill Paugh Singleton
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 AppSingleton { | |
| private AppSingleton() { | |
| } | |
| private static class SingletonHelper{ | |
| private static final AppSingleton INSTANCE = new AppSingleton(); | |
| } | |
| public static AppSingleton getInstance(){ | |
| return SingletonHelper.INSTANCE; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment