[求助]static
public class Put { //第1行
static int s=0; //第 2行
public Put() { //第三行
}
public static void main(String []a)
{
System.out.println (s);//第四行
s=s+9;
System.out.println (s);
}
}
如果把第二行拿到第四行的前边或后边会报错误“非法的程序开始”是因为static 只能调用其它静态方法吗
2007-05-28 18:22
放到第四行肯定不行了,你没定义怎么输出.
静态的,只能用静态的调用或更高的去搞用. 个人看法.``````

2007-05-28 18:33
2007-05-28 18:39
刚才复制粘贴的,说的不够严谨...
[此贴子已经被作者于2007-5-28 19:33:46编辑过]

2007-05-28 19:30
2007-05-29 12:06
2007-05-29 13:38