简体   繁体   中英

How and When the Serialized Objects are used by the end user

Some days back I've been interviewed in the Serialization process. As everyone knows Serialization is the process of converting the object into a byte stream and saved into a file.

Interviewer : How the end user come to know it is serialized object ??

Me : Based on the serialVersionUID

Interviewer : How he come to know the serialVersionUID , because your serializing the object, but how he know that file is the serialized object.

Me : Ummmm... ummmm...

My question is when the end user will use that serialized object, and how he will identify this is the serialized object.

Interviewer: How the end user come to know it is serialized object?

Strange question.

Me : Based on the serialVersionUID

Even stranger answer. How does the end user get to see a serialVersionUID ?

The correct answer as far as I can see is that he doesn't 'come to know it'. The end user just operates the application. He doesn't even see code, let alone objects, let alone get to know how they were instantiated. Strange question.

Note that the final sentence above would have been part of my answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM