为什么在父类中定义的方法需要void返回值,而在子类中不需要?
父类:
public void Cars(String name,double price,int seat,int load){
this.name=name;
this.price=price;
this.seat=seat;
this.load=load;
}
子类:
public PickCar(String name,double price,int seat,int load){
this.seat=seat;
this.load=load;
this.price=price;
this.name=name;
}