Created
November 29, 2016 11:24
-
-
Save kevalpatel2106/bf032de13332430476d2af631ffe7888 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 SingletonClass { | |
private static volatile SingletonClass sSoleInstance = new SingletonClass(); | |
//private constructor. | |
private SingletonClass(){} | |
public static SingletonClass getInstance() { | |
return sSoleInstance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment