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?
Java Serialization with Transient Field
Asked Answered
They get set to the default value for the type: zero, false, or null.
© 2022 - 2024 — McMap. All rights reserved.