How to create thread-safe Singleton in Java?

Compiled By Unknown - No Comments
This question is actually follow-up of previous question. If you say you don't like double checked locking then Interviewer is bound to ask about alternative ways of creating thread-safe Singleton class. There are actually man, you can take advantage of class loading and static variable initialization feature of JVM to create instance of Singleton, or you can leverage powerful enumeration type in Java to create Singleton.

Tags:

No Comment to " How to create thread-safe Singleton in Java? "