public Car[] cars
public Car[] dataInit() {
Car[] cars = {
new PassengerCar("奥迪A4", 500, 4),
new PassengerCar("马自达6", 400,4),
new PickupCar("皮卡雪6", 450, 4, 2),
new PassengerCar("金龙", 800, 20),
new TruckCar("松花江", 400, 4),
new TruckCar("依维柯", 1000, 20),
};
return cars;
}
这个Car[] cars 的Car[]是什么意思呢,创建这个还需要有一个Car类