Transient and Volatile Variables


There are two other modifiers that can be applied to variable declarations. The transient keyword indicates that a member variable should not be serialized. A serializable entity is one that can be persistently stored (to disk for instance) and recovered. If a variable is declared to be volatile, the compiler will not perform certain synchronization optimizations. These modifiers are not widely used in Java programming. They are briefly discussed here for completeness.



Technical Java. Applications for Science and Engineering
Technical Java: Applications for Science and Engineering
ISBN: 0131018159
EAN: 2147483647
Year: 2003
Pages: 281
Authors: Grant Palmer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net