Why should a Singleton class be serialized only once ?

 Posted by Akiii on 1/16/2012 | Category: Design Pattern & Practices Interview questions | Views: 4935 | Points: 40

If a Singleton class is serialized and then De-serialized multiple times, there will be multiple objects which will violate the principles of Singleton pattern. Therefore it should be serialized and De-serialized only once !

Thanks and Regards

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response