Advertisement
Guest User

Untitled

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