Annonymous classes are never static even if it's in a static context.
What about the local inner classes in a static method ?
Why static declarations are not allowed in the following ?
I have this:
class Test{
int i;
static void
test(){
class Test1{
static int j // This complains..that inner classes
// cannot have static declarations
int k = i; //this complains, as non-static variable
//cannot be accessed from a static context
}
}
}