Variables may be marked transient
to indicate that they are not part of the persistent state of an object. If an instance of the class Point
:
class Point { int x, y; transient float rho, theta; }
were saved to persistent storage by a system service, then only the fields x
and y
would be saved. This specification does not yet specify details of such services; we intend to provide them in a future version of this specification.
transient
FieldsAdding or deleting a transient
modifier of a field does not break compatibility with pre-existing binaries.