为什么在下面的代码中,给静态变量赋值是可接受的,但使用同一变量却不可接受?
class Test
{
static
{
var=2; //There is no error in this line
System.out.println(var); //Why is there an error on this line if no error on the above line
}
static int var;
}