The singleton design pattern in Java is one that I found over the years to be both tricky and interesting. There are many ways to break this pattern – and developers keep writing about different techniques to break it. One powerful way to break this pattern is to use reflection to access the private constructor and instantiate the class as many times as you want. The underlying idea is that you can call private members of any class using theAccessibleObject.setAccessible(true)┬áreflection method. There are available techniques to prevent such reflection attacks. One of them is using the old way of writing your Singleton class, that is, not using lazy initialization, and, in addition to that, throwing an exception in the constructor[…]