Hi Sergej, you are right, I missed the fact that the statement is about local class. But that confuses me because I can't think of a scenario where instance of a local class can be created from a static context but the local class itself exists in a non-static context.
For example:
Here Inner class is a local class in a non-static method. Now how can I create instance of this class in a static context? I can't create a static method/block inside Inner. Maybe there's some scenario that I'm missing where the statement applies
The following code shows 2 errors, one of which is due the statement in question (thus proving the JLS correct). But this is a weird scenario as the staticMethod itself is invalid: