Java??super?????
???????????? ???????[ 2014/4/24 9:31:56 ] ????????Java super ??????
???????super???ó???????
????super??parameter-list????
????parameter-list????????й???????????κ??βΣ?super????????????????????????е??????????????????κ??????????????????super?????????????е??????????????????????????
???????????????????super???????????????????????????磺C????B??B????A????C?????????????super??????B??????????
????????????super?????????????????????????????βΣ?????????
???????磺
<span style="font-size:14px;">public class test {
public static void main(String [] args){
new Teacher("one"?? 62);
new Teacher("two"?? 180);
new Teacher("three"?? 65?? 188);
}
}
class Human {
static private float weight;
static private int height;
Human(float weight){
Human.weight = weight;
System.out.println(Human.weight);
}
Human(int height){
Human.height = height;
System.out.println(Human.height);
}
Human(float weight?? int height){
Human.weight = weight;
Human.height = height;
System.out.println(Human.weight + " " + Human.height);
}
}
class Teacher extends Human {
static private String s;
Teacher(String s?? float weight){
super(weight);
Teacher.s = s;
System.out.println(Teacher.s);
}
Teacher(String s?? int height){
super(height);
Teacher.s = s;
System.out.println(Teacher.s);
}
Teacher(String s?? float weight?? int height){
super(weight?? height);
Teacher.s = s;
System.out.println(Teacher.s);
}
}
</span>
?????????
????62
????one
????180
????two
????65.0 188
????three
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11