Singleton Pattern
问题 This question, like my previous question, references Effective Java . This time I have quite a few sub-questions. A privileged client can invoke the private constructor reflectively with the aid of the AccessibleObject.setAccessible() method. If you need to defend against this, modify the constructor. How, exactly, can a private constructor be invoked? And what is AccessibleObject.setAccessible() ? What approach do you experts follow with singletons? // Approach A public class Test{ public