java 实现的单例,在static块中实例化是否会有线程安全问题?
public final class HoneyConfig {private static HoneyConfig honeyConfig null;static {honeyConfig new HoneyConfig();}private HoneyConfig() {}public static HoneyConfig getHoneyConfig() {return honeyConfig;}}//以上java代码,会实例化时,是…
2025-01-19