Java Reference
In-Depth Information
Modiier Used on
Meaning
Interface
The interface is accessible anywhere its package is.
Member
The member is accessible anywhere its class is.
Class
All methods of the class are implicitly strictfp .
strictfp
Method
All loating-point computation done by the method must be performed in a
way that strictly conforms to the IEEE 754 standard. In particular, all values,
including intermediate results, must be expressed as IEEE float or double
values and cannot take advantage of any extra precision or range ofered by
native platform loating-point formats or hardware. This modiier is extremely
rarely used.
Class
An inner class declared static is a top-level class, not associated with a
member of the containing class. See Chapter 4 for more details.
static
Method
A static method is a class method. It is not passed an implicit this object
reference. It can be invoked through the class name.
Field
A static ield is a class ield. There is only one instance of the ield,
regardless of the number of class instances created. It can be accessed
through the class name.
Initializer
The initializer is run when the class is loaded rather than when an instance is
created.
Method
The method makes nonatomic modiications to the class or instance, so care
must be taken to ensure that two threads cannot modify the class or instance
at the same time. For a static method, a lock for the class is acquired
before executing the method. For a non- static method, a lock for the
speciic object instance is acquired. See Chapter 5 for more details.
synchronized
Field
The ield is not part of the persistent state of the object and should not be
serialized with the object. Used with object serialization; see
java.io.ObjectOutputStream .
transient
Field
The ield can be accessed by unsynchronized threads, so certain optimizations
must not be performed on it. This modiier can sometimes be used as an
alternative to synchronized . See Chapter 5 for more details.
volatile
 
Search WWH ::




Custom Search