Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static synchronized Singleton getInstance() {
- if (singletonInstance == null) {
- synchronized (singletonInstance) {
- if (singletonInstance == null) {
- singletonInstance = new Singleton();
- }
- }
- }
- return singletonInstance;
- }
Advertisement
Add Comment
Please, Sign In to add comment