ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

How do you prevent for creating another instance of Singleton during serialization?

You can prevent this by using readResolve() method, since during serialization readObject() is used to create instance and it return new instance every time but by using readResolve you can replace it with original Singleton instance.

Related Posts Plugin for WordPress, Blogger...
Flag Counter