Originally posted by Suneesh Raman:
2. What is the difference between Sigleton pattern and a class having all static variables and methods
A class with all static variables and methods will likely never be instantiated. A singleton is a class that is designed to be instantiated exactly one time so that there is a single instance of that class for the life of the application.
Using a singleton rather than static methods allows you to use inheritence. Perhaps you define an abstract class as the base for the singleton and then extend it to create a many concrete classes that you actually instantiate. At runtime you use some property to choose which concrete class to use for that run.