According to Josh Bloch Efficient Java Enum is the best way to implement the Singleton pattern.
The Java enum takes care of Serialization and Thread Safety on its own. But I do not understand how.
Can someone explain this?
I looked over this and this .
The second link gives a good amount of detail that the enumeration is serializable, but I don't get enough explanation of thread safety.
Also, are the methods declared in the enumeration thread safe or require special care?
source
share