饿汉模式
public static ConfigManager getInstance(){
if (configManager==null) {
configManager=new ConfigManager();
}
return configManager;
}
懒汉模式
public static synchronized ConfigManager getInstance(){
if (configManager==null) {
configManager=new ConfigManager();
}
<