单例模式:
Ensure a class has only one instance and provide a global point og access to it.
public class Singleton {
private static final Singleton SINGLETON = new Singleton();
private Singleton(){
}
public static Singleton getSingleton(){
return SINGLETON;
}
public static void dosomething(){
//其他方法,尽量是static
}
}