Forums Register Login

A concept of serialization.

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
With interview questions it is not so much a case of what you know as how you answer. What did you say?
+Pie Number of slices to send: Send
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..?
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 860 times.
Similar Threads
java.lang.StackOverflowError during Serialization
Best way to serialize java object
serialization question deleted for a reason?
How the objects are constructed at the time of de-serialization?
Serialization and persistance
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:35:32.