Serialization in Java with writeObject() and readObject() methods | Serialization with inheritance

preview_player
Показать описание
In this video we will learn Serialization in Java using a demo project.
If you want to have some control over the process of serialization and deserialization in Java then you can add writeObject() and readObject() methods.
If you add methods writeObject() and readObject(), these methods will be called automatically when the object is serialized and deserialized respectively and provide the serialization mechanism rather than using the default mechanism.
Below is the GitHub link to download source:
Рекомендации по теме
Комментарии
Автор

Thanks so much! Great teacher! You are awesome!

Exodiq
Автор

Thanks for the video, I have a query:
With default serialization where Employee class is Serializable but its parent class person is Not Serialized. If I dont define the Implicit constructor in Employee Class (with super) then it throws error, how did you manage to bifurcate the constructor definition and get the null and 0 for parent class attributes in the first run.

betatesting
visit shbcf.ru