Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement