UML Diagram of cars
Using the information in the UML diagram above, suppose we execute the following Java statements:

Vehicle vehicle = new OilTanker(2500);
vehicle.move();

which definition of move will be executed?

The one defined in OilTanker
  • The one defined in Truck
  • The one defined in Vehicle
  • The one defined in PeopleHauler

PeopleHauler is an interface, it does not contain an implementation of move