With Java Serialization, I understand that when a field is marked as transient, it is not serialized. So when the object is deserialized, what happens to the fields that were set to transient? Do they get set to the values defined in the constructor?
They get set to the default value for the type: zero, false, or null.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With