What does the final keyword say
The final modifier can be applied to variables, method parameters, class fields and methods, or the classes themselves.
- The class cannot have descendants;
- The method cannot be overridden in inherited classes;
- The field cannot change its value after initialization;
- Method parameters cannot change their value inside a method;
- Local variables cannot be changed once a value has been assigned to them.
Read also:
Comments
Post a Comment