DONE public static void main(String a[])与public static void main(String[] ar
public class Scope {
int x=2;
int y=1;
public void method(int a){
int x=5;
for(int i=1;i<a;i++){
x=x+i;
}
System.out.println("x="+x+" y="+y+" a="+a);
}
public static void main(String[] args){
//书上是:public static void main(String a[]){这有什么区别吗?(都能通过!)
Scope x=new Scope();
x.method(6);
}
}
[此贴子已经被作者于2007-10-1 0:31:20编辑过]