daily pastebin goal
16%
SHARE
TWEET

creating

a guest Mar 25th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package SingeltonPattern;
  2.  
  3. public class Singelton {
  4.     private static Singelton instance;
  5.     private Singelton() {
  6.        
  7.     }
  8.     public static Singelton getInstance() {
  9.         if (instance == null) {
  10.             instance = new Singelton();
  11.         }
  12.         return instance;
  13.     }
  14. }
  15. class SingeltonTest {
  16.     public static void main(String[] args) {
  17.         System.out.println(Singelton.getInstance());
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top