@Override public Car getObject() throws Exception { System.out.println("FactoryBean getObject() run..."); Car car = new Car(); car.setName("myCar"); return car; }
public void modifyCar(int id, int price, String name, int model, String color) { Car temp = (Car) cars.get(id); temp.setPrice(price); temp.setName(name); temp.setModel(model); temp.setColor(color); cars.set(id, temp); }
void setCar(Car c) { c.setName(null); }