Description:
To implement Singleton pattern, we have different approaches but all of them have following common concepts.
Learn through my videos:

Program:
package com.telusko.codess;

public class Singleton {
	public static void main(String[] args)
	 {
	Abc obj1=Abc.getInstance();
	Abc obj2=Abc.getInstance();
	    }

	}
	class Abc
	{ 
	static Abc obj=new Abc();
	  private Abc()
	    {

	    }
	  public static Abc getInstance()
	    {
		  
	      return obj;
       }
}

Output:
Instance Created
Logic:
Private constructor to restrict instantiation of the class from other classes.
Private static variable of the same class that is the only instance of the class.
Public static method that returns the instance of the class, this is the global access point for outer world to get the instance of the singleton class.