标签: java singleton
有没有办法在单例设计模式中在类外创建对象?
public class Test { private Test() {} private static final Test t=new Test(); public static Test getTest() { return t; } }