我的重写没反应
1.
package com.imooc;
public class BUS {
public String siji;
public int zuowei;
public int chengke;
public void Set() {
System.out.println("司机姓名"+siji+"有多少座位"+zuowei+"有多少位乘客"+chengke);
System.out.println("巴士比出租车赚钱");
}
}
2.
package com.imooc;
public class car extends BUS {
public void set() {
System.out.println("司机姓名"+siji+"有多少座位"+zuowei+"有多少位乘客"+chengke);
System.out.println("没毛病老铁");
}
}
3.
package com.imooc;
public class ceshi {
public static void main(String[] args) {
// TODO Auto-generated method stub
car ca =new car();
ca.siji="老王";
ca.zuowei=52;
ca.chengke=99;
ca.Set();
}
}