Advertisement
jaVer404

level14.lesson08.bonus03 (Singleton)

Jun 25th, 2015
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. package com.javarush.test.level14.lesson08.bonus03;
  2.  
  3. /**
  4.  * Created by Roma on 25.06.2015.
  5.  */
  6. public class Singleton
  7. {
  8.     private Singleton() {
  9.     }
  10.     private static Singleton instance;
  11.  
  12.     public static Singleton getInstance() {
  13.         if (instance==null) {
  14.             instance = new Singleton();
  15.         }
  16.         return instance;
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement