| A subclass cannot override methods that are declared
final in the superclass (by definition, final methods cannot be overriden). |
| |
| If you attempt to override a final method, the compiler
will display an error message similar to this one and refuse to compile the program: |
| |
| FinalTest.java:7: Final methods can't be overriden.
Method void iamfinal() is final in class ClassWithFinalMethod.
|
| void iamfinal() { ^ 1 error |
| |
| |
| |
| |