A singleton is a class which only allows a single instance of itself to be created, and usually gives simple access to that instance
For Singleton you should also set constructor as private. You can call the getInstance without creating an object.Because the method is static.
For example
ApplicationData obj= ApplicationData.getInstance();
It will create an instance of
ApplicationData class on the first time. Then again you try to call this process it will restrict .
Hope this helps