Java Serialization with a Transition Field

With Java Serialization, I understand that when a field is marked as transient, it is not serialized. Therefore, when an object is deserialized, what happens to the fields that were set for the transition? Are they set to the values ​​defined in the constructor?

+6
source share
1 answer

They get the default value for the type: zero, false, or zero.

+11
source

Source: https://habr.com/ru/post/910653/


All Articles