Destructor final keyword If you are sure that a class will never be subclassed, you can enforce it via the final keyword. class X final { ... // Program won't compile if anyone tries to subclass X }