Syntax
>>-+-----------+-+----------+-+--------+-transient-Type-> +-public----+ +-final----+ '-static-' +-protected-+ '-volatile-' '-private---' >-+-Identifier--------------+-+----------------------+-;->< | v-----' | '-=-+-Expression-------' '-ArrayIdentifier-+-[-]-+-' '-ArrayInitializer-'
Description
Variables may be marked transient to indicate that they are not part of the
persistent state of an object. If an instance of the following class Point were saved to
persistent storage by a system service, then only the fields x and y would be saved :
class Point {
int x, y;
transient float rho, theta;
}
A constant declaration in an interface must not include the transient modifier or a compilation error occurs.
Syntax diagrams
final keyword
private keyword
protected keyword
public keyword
static keyword
volatile keyword
Source: The Java Language Specification. Copyright (C) 1996 Sun Microsystems, Inc.