Interview question: about Java serialization and singletons
- by subhashis
In an interview the interviewer asked me the following question: is it possible to serialize a singleton object? I said yes, but in which scenario should we serialize a singleton?
And is it possible to design a class whose object can not be serialized?