Code:
----------------------------------------------------------------
public class Class20 {
static int p = abc();
static public int abc() {
int i = 123; //1
System.out.println(p);
return i;
}
public static void main(
String arg[]) {
}
}
----------------------------------------------------------
Query: The above code is compiling successfully. My confusion is about the variable 'int i'? Wont it be a instance variable or
all those variables declared in static code are static by default
Please help me to clarify my doubt.