super
来源:互联网 发布:手机使用统计软件 编辑:程序博客网 时间:2024/04/26 07:27
class Father
{
public int num = 10;
}
class Son extends Father
{
public int num = 20;
public void show(){
int num = 30;
System.out.println(num);
System.out.println(this.num);//调用本类的成员变量
System.out.println(super.num);//调用父类的成员变量
}
}
class lll
{
public static void main(String[] args){
Son s =new Son();
s.show();
}
}
{
public int num = 10;
}
class Son extends Father
{
public int num = 20;
public void show(){
int num = 30;
System.out.println(num);
System.out.println(this.num);//调用本类的成员变量
System.out.println(super.num);//调用父类的成员变量
}
}
class lll
{
public static void main(String[] args){
Son s =new Son();
s.show();
}
}
0 0
- super
- super
- super
- super
- super
- super
- super()
- super
- super()
- super()
- super()
- super
- super
- super
- super
- super
- super
- super
- Android Developer - Processes and Threads
- javascript学习(十二)JS Number对象和Boolean对象
- Redhat Linux防火墙管理
- GreenDao3.2.0简单使用
- 【行业】互联网金融如何跨过亿元损失坑洞?精准化测试是关键!
- super
- jQuery插件开发分为两种:类级别,对象级别
- 并发过10万的TCP请求 ,对Linux内核优化配置
- Android应用启动流程
- 安卓5.1源码解析 : RecyclerView解析 从绘制流程,ViewHolder复用机制,LayoutManger,ItemAnimator等流程全面讲解
- spring-boot-swagger2 使用手册
- 周金涛20个预言,有待验证。
- 新年促销扎堆,8个邮件营销方法打动你的客户
- springboot(三) 用druid连接mybatis