/**
 * @file MySingleton.java
 * @author Valery Samovich
 * @version 1
 * @date 2015/02/16
 */

package com.samovich.specialized.patterns.singelton;

public class MySingleton {
}

@@ -90,90 +90,887 @@
 6%0A *
-/%0A%0Apackage com.samovich.specialized.patterns.singelton;%0A%0Apublic class MySingleton %7B
+ %0A * In software engineering, the singleton pattern is a design pattern that %0A * restricts the instantiation of a class to one object. This is useful when%0A * exactly one object is needed to coordinate actions across the system.%0A */%0A%0Apackage com.samovich.specialized.patterns.singelton;%0A%0Apublic class MySingleton %7B%0A    %0A    private static MySingleton myObj;%0A    %0A    // Create private constructor%0A    private MySingleton() %7B%7D%0A    %0A    // Create a static method to get instance%0A    public static MySingleton getInstance() %7B%0A        if(myObj == null) %7B%0A            myObj = new MySingleton();%0A        %7D%0A        return myObj;%0A    %7D%0A    %0A    public void getSomething() %7B%0A        // Do something here%0A        System.out.println(%22I am here ...%22);%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        MySingleton st = MySingleton.getInstance();%0A        st.getSomething();%0A    %7D%0A    
 %0A%7D%0A

Add Singleton Example