大神们看看会吗
给定一个Java程序代码,如下:
public class Test{
int count = 9;
public void count1(){
int count =10;
System.out.println("count1="+count);
}
public void count2(){
System.out.println("count2="+count);
}
public static void main(String args[]){
Test t=new Test();
t.count1();
t.count2();
}
}
编译运行后,输出结果是()
A. count1=9 count2=9
B. count1=10 count2=9
C. count1=10 count2=10
D. count1=9 count2=10 |
|