Java??super?????
???????????? ???????[ 2014/4/24 9:31:56 ] ????????Java super ??????
????????super??????????
???????磺
<span style="font-size:14px;">public class test {
public static void main(String [] args){
new Teacher("three"?? 65?? 188);
}
}
class Human {
static public float weight;
static public int height;
}
class Teacher extends Human {
static private String s;
Teacher(String s?? float weight?? int height){
super.weight = weight;
super.height = height;
Teacher.s = s;
System.out.println(super.weight);
System.out.println(super.height);
System.out.println(Teacher.s);
}
}</span>
?????????
????65.0
????188
????three
????????super??this??????
????1)super??????????????????е????????????????????????е??????????this?????????????????????????γ????????????????????е??????????
????2)super??????????????????е????????????????????б??????????г???????????????????????????????????????磺super.?????? super.???????????????Σ???this?????????????????????????????????????????this??????????????????????β??????е???????????????????this??????????????????
????3??????super()????д???????????????У??????????????????????????????????????????????super()????????????????????????????????????????????super()??this()????????????super()???????е??????????????this()?????????????????????
????4??super()??this()?????????????????У?
????5???????????this???????????????????????????????
????6??this??super????????????????????????棬???this????????????????????????????????????????super?????????????????????????????????????????????????壬????????????????
????7??this()??super()?????????????????????????static????????á???????static??????static??????static???飻
????8????????????this???????????????? ???super?????Java??????
??????
???·???
??????????????????
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