The easiest way to create a class with a single instance is to use enum
public enum Singleton { INSTANCE }
You can compare this with Steve Taylor's answer to find out how simple it is than alternatives.
By the way: I would suggest that you use solitary stateless singles. If you need single, single versions, you'd better use dependency injection.
Peter Lawrey
source share