Can we serialize/deserialize a Singleton class or class with no default or no parameter constructor in java?
if not what is the way to do it?? will creating a no parameter protected constructor help?
Can we serialize/deserialize a Singleton class or class with no default or no parameter constructor in java?
if not what is the way to do it?? will creating a no parameter protected constructor help?
You should create a proxy object for your Singleton and serialize it in the Singleton's stead.
You can read more about proxy serialization here.