Javasuper关键字:
super 在构造函数中出现的时候一般是当前这个类继承了其他的类,super 的出现就是为了调用父类的构造函数,贴段代码先
class Tiger {
2 int age; // 年龄
3 int hight; // 身体高度
4
5 public Tiger() {
6 print();
7 }
8
9 public void print() {
10 System.out.println("I'am a " + age + "岁 " + hight + "尺高 tiger!");
11 }