考大家一道题(把我迷糊了) 答对"有奖"!
选择下面这段代码的输出结果:-----------------------------------------------------------------
class Test{
public int i=10;
}
public class ObParm{
public static void main(String argv[]){
ObParm o=new ObParm();
o.amethod();
}
public void amethod(){
int i=99;
Test v=new Test();
v.i=30;
another(v,i);
System.out.println(v.i);
}
public void another(Test v, int i){
i=0;
v.i=20;
Test vh=new Test();
v=vh;
System.out.println(v.i+" "+i);
}
}
----------------------------------------------------------
A 10,0,30
B 20,0,30
C 20,99,30
D10,0,20
(不许运行哦!)