public class Test{
public int aMethod(){
static int i=0;
i++
return i;
}
public static void main(String args[]){
Test test = new Test;
test.aMethod();
int j=test.aMethod;
System.out.println(j);
}
}
不能编译,非静态方法里不能存在局部的静态变量