SingleTon:
    A singleton is a class that allows only a single instance/object of itself to be created and gives access to that created instance. It contains static variables that can accommodate unique and private instances of itself. 

SingleTon is a design pattern in java.



Q: How to create singleTon class?
Ans:
(1) Make sure instance/object can't be created to the class. To make that create a private constructor inside the class

(2) Declare a private static varible for the class object. Write a static method which will return the class object through a check. (If the object is already created to the class then dont create another object/instance to the class. Instead use the already created object.)

(3) create a object/instance to the class by calling the static method



Q: Importance of SingleTon?
Ans:
 effective memory management by avoiding creation of multiple instances to the same class.
 
 