下列A类的类体中哪些代码是错误的?为什么?class A{ int x=100; /[代码1] static longy; /[代码2] y= 200; //[代码 3] public void f({ y=300; //[代码4] } public static void gO{ x=-23; //[代码5]
statis方法中不能使用非静态变量,把getO方法去掉static修饰就可以了