A better singleton without synchronized.
http://stackoverflow.com/questions/16106260/thread-safe-singleton-class
public class Something { private Something() {} private static class LazyHolder { private static final Something INSTANCE = new Something(); } public static Something getInstance() { return LazyHolder.INSTANCE; } }