Error: java: non-static method a() cannot be referenced from a static context
I get this error on the following code.
enum ENUM
{
A()
{
{
a();
}
}
,
;
private void a()
{}
}
I expect this to compile, but it doesn't.
Changing the access level modifier private from method a() to any other lets the code compile.
What may prevent this code from compiling?