输出的数字总是hashcode
Car car1[] = { new Car(1, "奥迪A6", "500/天", "载人"),
new Car(2, "马自达6", "300/天", "载人"),
new Car(3, "金龙皮卡", "600/天", "载货"),
new Car(4, "雪铁龙251", "400/天", "载人,载货"),
new Car(5, "长城C30", "200/天", "载人") };
System.out.println("您可租车的类型及价格目录表:");
System.out.println("序号" + "\t" + "汽车名称" + "\t" + "租金(元/天)" + "\t" + "容量");
for(int i =0 ;i<car1.length;i++){
System.out.println(" " + (i+1) + "\t" + car1[i]);
}