Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 这个a到底是多少?(成员变量在继承时的覆盖问题)
铁针





发贴: 90
积分: 1
于 2003-05-09 11:49 user profilesend a private message to usersend email to 铁针search all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
class SuperClass{
int a;
public SuperClass(){a=12;}
void test(){System.out.println("this is the super!");}
}

class SubClass extends SuperClass{
int a;
public SubClass(){a=13;}
void test(){System.out.println("This is the subclass");}
}

class Test{
public static void main(String args[]){
SuperClass temp = new SubClass();
System.out.println(temp.a);}
}





话题树型展开
人气 标题 作者 字数 发贴时间
11205 这个a到底是多少?(成员变量在继承时的覆盖问题) 铁针 371 2003-05-09 11:49
9903 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) yakuu 145 2003-05-09 13:18
9493 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) hoppocket 62 2003-05-11 23:02
9562 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) why 136 2003-05-12 13:43
10217 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) liufancjsdn 120 2003-05-12 14:09
9502 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) hoppocket 21 2003-05-12 00:30
9667 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) mochow 6 2003-05-12 12:24
9486 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) arno 7 2003-05-12 13:38
9493 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) arno 38 2003-05-12 13:56
9419 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) arno 16 2003-05-12 14:07
9785 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) qilong2000 19 2003-05-13 17:07
10313 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) 铁针 18 2003-05-09 14:52
9553 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) hoppocket 123 2003-05-09 19:57
9573 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) hoppocket 60 2003-05-09 20:06
9528 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) hoppocket 291 2003-05-09 22:52
9716 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) mochow 753 2003-05-09 23:25
10233 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) 铁针 7 2003-05-09 23:35
9506 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) hoppocket 56 2003-05-10 11:03
10117 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) Jove 177 2003-05-10 15:29
9689 Re:这个a到底是多少?(成员变量在继承时的覆盖问题) mochow 91 2003-05-10 17:58

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923