求大神分析一下这个题目
java吧
全部回复
仅看楼主
level 7
枪神ZZ
楼主
class Student{
public static int age;
}
public class Test{
public static void main(String []args){
Student stu=new Student();
stu.age=10;
Student stu1=new Student();
stu1.age=20
System.out.println(stu.age);
}
}
输出结果是什么,为什么啊!!!
2011年12月07日 04点12分
1
level 11
a250152
20 静态用一个内存地址
2011年12月07日 05点12分
2
level 5
逝1忆
20吧 你的age 是static
2011年12月07日 05点12分
3
1