Does serialization break singleton property in Java?
The interviewer is asking you a question about a technology that you do not use as a web architect but that you need to be familiar with when designing websites. No matter how talented you are or how impressive your website design is, it still needs to be practical to be able to be created by web developers. This requires you to be familiar with the technology developers use and how it impacts your website designs.
The more familiar you are with the technology used to create your designs, the more effective your web of architectures will be. Therefore, it is in your best interest to learn as much about these as you can. As you gain experience in this area, you will better understand how to implement these technologies within your designs to improve their functionality and appearance. This will also help you prepare for the interviewer's questions, which will, in turn, make it more likely that you'll be hired for this job.
"Yes, serialization can cause breakage of singleton property in Java. Serialization is used to transform an object and either save it or rout it to another entity. if you serialize a singleton class and then de-serialize the object, a new instance will be created, thereby breaking the singleton property."
