There was a question I faced in the interview which was like what is the internal mechanism of JVM for serialization. Like he asked me how the the JVM recognizes internally that if the class implements Serialization then only it is illegible for storing Objects into a file through Serialization process.
Can you please help me out with this question.
I said that "as far as i know implementing Serializable is a kind of contract that class is assigned to. like the contract says that class is now identified by the JVM having the capability of Serialization"
So he cross questioned me that (after i said that Serializable is a Marker) how can a marker define a contract. As it does not have any methods into it. After he asked me that "Have you tried to know the internal working?" So like I denied an the question was changed.
What kind of answer should I have given after that ritchie..?