We write a public static getter or access method to get the instance of the Singleton Object at runtime. First time the object is created inside this method as it is null.
This Program is a basic program which demonstrates the purpose of Singleton pattern in Java.
In the Singleton Design Pattern you never have more than one instance of a object. A tutorial to understand Java Singleton design pattern with some example and code snippet