Nonaccess Member Modifiers

final and abstract,transient, synchronized, native, strictfp,static

Final Methods
The final keyword prevents a method from being overridden in a subclass, and is
often used to enforce the API functionality of a method.


Final Arguments
Method arguments are essentially the same as local variables. final argumentsmeans it can't be modified within the method.

Abstract Methods
an abstract method declaration doesn't even have curly braces for where the implementation code goes, but instead closes with a semicolon. In other words, it has no method body. You mark a method abstract when you want to force subclasses to provide the implementation.

Synchronized Methods
The synchronized keyword indicates that a method can be accessed by only one
thread at a time.  synchronized modifier can be applied only to methods—not variables, not classes, just methods.

Native Methods
The native modifier indicates that a method is implemented in platform-depen-
dent code, often in C.      native can be applied only to methods—not classes, not variables, just methods.
Note that a native method's body must be a semicolon (;) (like abstract methods),
indicating that the implementation is omitted.

Strictfp Methods
 strictfp forces floating points (and any floating-point operations) to
adhere to the IEEE 754 standard.





请使用浏览器的分享功能分享到微信等