Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public class Something {
  2. private Something() {}
  3.  
  4. private static class LazyHolder {
  5. private static final Something INSTANCE = new Something();
  6. }
  7.  
  8. public static Something getInstance() {
  9. return LazyHolder.INSTANCE;
  10. }
  11. }
  12.  
  13. public class Something {
  14. private Something() {}
  15.  
  16. private static final Something INSTANCE = new Something();
  17.  
  18. public static Something getInstance() {
  19. return INSTANCE;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement