Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A concept of serialization.

 
Ishan Pandya
Ranch Hand
Posts: 226
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hie Everyone,

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.

Thanks
Ishan
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With interview questions it is not so much a case of what you know as how you answer. What did you say?
 
Ishan Pandya
Ranch Hand
Posts: 226
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic