Description:
In computer programming, lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed. In singleton pattern, it restricts the creation of instance until requested first time.
Learn through my videos:

Program:
package singleton;


public class Singleton
 {   
public static void main(String[] args) 
    {
        Thread t1 = new Thread(new Runnable() {
            @Override
          public void run()
            {
              Abc obj=Abc.getInstance();

            }
        });

         Thread t2 = new Thread(new Runnable() {
            @Override
          public void run() 
           {
           Abc obj1=Abc.getInstance();

            }
        });

            t1.start();
             t2.start();

    }
}
            class Abc
            { 
            public static Abc obj;
             int i;
             private Abc()
             {
               System.out.println("Instance Created");
             }
            public static synchronized AbcgetInstance()
           {

           if(obj==null)
           {
            synchronized(Abc.class)
            {
              if(obj==null)
              obj=new Abc();
            }
        }
         return obj;
    }
}
Output:
 
Instance Created
Logic:
Lazy initialization method to implement Singleton pattern creates the instance in the global access method.