Making the constructor private and using a static getter method only, your singleton object will not be able to survive in multi-thread or multi CPU environment. We will look for a soluton to singleton usage problem in multithread environment. First attempt will be double-locking mechanism, then we will use volatile keyword to complete the task.
This is a production of www.javathlon.com.
Happy learning.