Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. class Singleton{
  2.  
  3. public static Singleton instance;
  4.  
  5. public static Singleton getInstance()
  6. {
  7. if(instance == null){
  8. instance = new Singleton();
  9. return instance;
  10. }
  11. return instance;
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement