What is the purpose of the modifier transient
in Java?
Answer 1, Authority 100%
Serialization is a class instance conversion in a form suitable for its saving (for example, to a file, in database or for transmission over the network). Serialized objects can then be restored (deserialize).
Class properties marked by the transient
modifier are not serialized.
Usually in such fields the intermediate state of the object is stored, which, for example, is easier to calculate than to serialize and then deserialize. Another example of such a field is a reference to an object instance that does not require serialization or cannot be serialized.