10 Interview questions on Singleton Pattern in Java(javarevisited.blogspot.com)
javarevisited.blogspot.com
10 Interview questions on Singleton Pattern in Java
http://javarevisited.blogspot.com/2011/03/10-interview-questions-on-singleton.html?sms_ss=hackernews&at_xt=4d71fa08f9706504%2C0
2 comments
Agree, Singleton loaded by Classloader is most robust way of doing it but they I just think why people discovered double check locking pattern for creating singleton instance ?
Most of these are trivial or just generic threadsaftey questions.
You probably should not be using the singleton pattern in the first place though, global state is not an elegant solution.
You probably should not be using the singleton pattern in the first place though, global state is not an elegant solution.
http://en.wikipedia.org/wiki/Singleton_pattern#The_solution_...