1 Any methods in a final class are automatically final.
2 A final variable cannot have it's value changed and must be set at creation time. This is similar to the idea of a constant in other languages.
3
Modifier | Method | Variable | class |
public | yes | yes | yes |
private | yes | yes | yes (nested) |
protected | yes | yes | yes(nested) |
abstract | yes | no | yes |
final | yes | yes | yes |
transient | no | yes | no |
native | yes | no | no |
volatile | no | yes | no |