Well, inner classes are no different from outer classes in this context. Thus, the following code is completely correct.
class Outer { int some_member; class Inner { void method(); } } class OuterExtendsInner extends Outer.Inner{ }
As we all know, the purpose of declaring a final class is that we forbid any external attacker from subclassing the class and using its capabilities in the same way as we can do with inner classes.
source share