|
|
3.16. final Classes
Similar to final methods, you can also define a class as final. Doing so disallows inheriting from this class. The following code does not work:
final class MyBaseClass {
...
}
class MyConcreteClass extends MyBaseClass {
...
}
MyBaseClass has been declared as final; MyConcreteClass may not extend it and, therefore, execution of the script fails.
|
|