Automobile类: public class Automobile { private String name; public Automobile(String name){ this.name= name; } public String getName() { return name; } public void setName(String name) { this.name = name; } } Holder1类:持有指定的单一类型对象. public class Holder…