It is possible to have static var. inside the static block but construction is not possible.
The following e.g will compile
class testy{
static int i;
static{
i=1; //i is static
}
public static void main(String[] args)
{
}
}
Originally posted by John McErkland:
I don't think it is possible to have static variables within any block of code e.g. not possible to have method local static variables.