Java Modifiers
Modifiers are keywords that determine the characteristics of classes, interfaces, and their members. They can be placed at the beginning of each declaration.
The modifiers that can be specified are determined by the target. The following table summarizes where each modifier can be used.
Modifiers Available in Java
| Modifier | Class | Interface | Method | Field | Constructor |
|---|---|---|---|---|---|
| Access modifier | ○ | ○ | ○ | ○ | ○ |
| abstract | ○ | ○ | ○ | × | × |
| static | ○ | ○ | ○ | ○ | × |
| final | ○ | × | ○ | ○ | × |
| transient | × | × | × | ○ | × |
| volatile | × | × | × | ○ | × |
| synchronized | × | × | ○ | × | × |
| native | × | × | ○ | × | × |
| strictfp | ○ | ○ | ○ | × | × |
Note
**Order of modifier descriptions**
Multiple modifiers can be specified together for one target. There is no strict rule for the written order, but it is generally common to write them in the order shown in the table above.