Java Serialization is a mechanism to transform a graph of Java objects into byte stream (an array of bytes) for storage or transmission, such that said array of bytes can be later transformed back into a graph of Java objects.
To opt a class in for Seriliazation, you
‘Singleton’ is a fancy word for ‘global variable.’
The intent of Singleton:
Ensure a class only has one instance, and provide a global point of access to it. - GOF
All singleton implementations offer NO public constructor but only private constructor to enforce non-instantiability. In Java, however, because a private constructor can still be accessed through a backdoor of using reflection, you want to add extra check in the private constructor to guard against reflection vulnerability (see examples below).