java serialization tutorial in singleton,inheritance,transient explained

preview_player
Показать описание
Java Object Serialization
Serialization tutorial with singleton,inhertance,transient,serialVersionUID example
serialization singleton example
serialization example inheritance
serialization example transiet

Рекомендации по теме
Комментарии
Автор

Nice tutorial. The second use case throws InvalidClassException because the super class does not have a no-arg constructor. While deserializing an object if the base class is not serializable then its no-arg constructor is called even though the other constructor of Employee is called in Address using super. The exception also clearly mentions "no valid constructor". Try adding a no-arg constructor in Employee and the second use case will work. In third use case if you change the singleton object's attributes after serializing it, since readResolve() is returning the same singleton object you'll not get the object state which was persisted.

madhuraoak
Автор

Thanks a lot. it means it is not defined in any class.

AmitKumar-qhow
Автор

Very informative, thanks for the video.

BerkayCelik
Автор

Very Good Tutorial. Thanks for it. Could you please let me class name where the method readResolve() exits. Thanks in Advance.

AmitKumar-qhow