SHARE
TWEET

Untitled

a guest Aug 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Signleton{
  2.   private static Singleton singleton
  3.  
  4.     private Singleton(){
  5.            //... do other intantiation stuff here..
  6.     }
  7.  
  8.     public static Singleton getInstance(){
  9.         if(singleton == null){
  10.            this.singleton = new Singleton();                         
  11.         }
  12.         return singleton;      
  13.     }
  14.     // other responsibities...
  15.     ..
  16.     ...
  17.  
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top