super位置
来源:互联网 发布:十大淘客软件 编辑:程序博客网 时间:2024/05/01 04:25
class Father
{
int age;
public Father(){
System.out.println("Father的无参构造方法");
}
public Father(String name){
System.out.println("Father的带参构造方法");
}
}
class Son extends Father
{
public Son(){
//super//隐藏的
System.out.println("Son的无参构造方法");
}
public Son(String name){
//super//隐藏的
System.out.println("Son的有参构造方法");
}
}
class superweizhi
{
public static void main(String[] args){
Son s = new Son();
System.out.println("-------------");
Son s2 = new Son("秦桧");
}
}
{
int age;
public Father(){
System.out.println("Father的无参构造方法");
}
public Father(String name){
System.out.println("Father的带参构造方法");
}
}
class Son extends Father
{
public Son(){
//super//隐藏的
System.out.println("Son的无参构造方法");
}
public Son(String name){
//super//隐藏的
System.out.println("Son的有参构造方法");
}
}
class superweizhi
{
public static void main(String[] args){
Son s = new Son();
System.out.println("-------------");
Son s2 = new Son("秦桧");
}
}
1 0
- super位置
- java,super()的位置和参数
- 子类继承父类时,super的初始化位置
- super
- super
- super
- super
- super
- super
- super()
- super
- super()
- super()
- super()
- super
- super
- super
- super
- SIP Presence SUBSCRIBE-NOTIFY
- Forking in SIP
- debian进入单用户模式更改密码
- Why only SIP INVITE can be CANCELed ?
- SIP MESSAGE Delivered
- super位置
- 基于RSTP协议的流媒体播放
- dev C++ windows程序 undefine reference to
- TEC1304.值集和弹性域相关技术总结 - 第四章 弹性域安全性详解
- [C++]pragma comment的使用
- 18. 4Sum#1
- 最基本的C++ 窗口程序代码及完整注释
- 《Effective java》笔记(第二版) --第二章(1-3)
- Remove '@override' annotation