简单工厂

master
terry 3 years ago
parent 0dfe1411c2
commit 10c0b22f85

@ -2,7 +2,8 @@ package factoryMethod;
public class Main {
public static void main(String[] args) {
Vehicle vehicle = new Car();
vehicle.go();
// Vehicle vehicle = new Car();
// vehicle.go();
new SimpleVehicleFactory().createCar().go();
}
}

Loading…
Cancel
Save