Created
December 26, 2022 04:20
-
-
Save zoren/ae8f1f91df51fabaef077521d6bbe235 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Outer { | |
static final int staticFinalConstant = 42; | |
class Inner { | |
public int field = staticFinalConstant; | |
} | |
static void m() { | |
new Inner(); // error: non-static variable this cannot be referenced from a static context | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment