Can we Serializing/Deserializing 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 Serializing/Deserializing 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 -> http://lingpipe-blog.com/2009/08/10/serializing-immutable-singletons-serialization-proxy/