package gongju;
public class trrafic {
int nums;
String name;
String way;
public trrafic(int nums,String name,String way){
this.nums=nums;
this.name=name;
this.way=way;
}
}
package gongju;
public class bus extends trrafic {
public bus(){//提示错误
super.trrafic(50,"汽车","陆地");//提示错误
}
}
我在子类bus中使用super调用父类有参的构造方法赋值。为什么一直提示错误
Yexiaomo
相关分类