Ankur kothari wrote:Does the first sentence mean that
class Z {
int j=2;
static int i = j + 2;
}
will give a compile error because of the simple name of j or static variables cant access non static variables
Yes. Because static variable(s) belongs to a class, not to a particular instance.