Description:
In eager initialization, the instance of Singleton Class is created at the time of class loading, this is the easiest method to create a singleton class but it has a drawback that instance is created even though client application might not be using it.
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 Abc getInstance()
    {
if(obj==null)
        {
obj=new Abc();
        }
return  obj;
    }
}
Output:
Instance Created
Logic:
This is a design pattern where an instance of a class is created much before it is actually required. Mostly it is done on system start up. In singleton pattern, it refers to create the singleton instance irrespective of whether any other class actually asked for its instance or not.