Next: The object class
Up: Extending Classes
Previous: Overriding methods, hiding fields,
Contents
- No extended class can override the method to change its behavior. (This is the final version of that method.)
- A class marked final cannot be extended by any other class (and, all the methods of a final class are implicitly final).
- Security - anyone who uses the class can be sure the behavior will not change (validatePassword example).
- Serious restriction on the use of the class.
- Final simplifies optimizations.
Next: The object class
Up: Extending Classes
Previous: Overriding methods, hiding fields,
Contents