class Vehicle {
protected String brand;
public Vehicle(String brand) {
this.brand = brand;
}
}
class Car extends Vehicle {
private int doors;
public Car(String brand, int doors) {
super(brand); // ← обязательно
this.doors = doors;
}
} class Vehicle {
protected String brand;
public Vehicle(String brand) {
this.brand = brand;
}
}
class Car extends Vehicle {
private int doors;
public Car(String brand, int doors) {
super(brand); // ← обязательно
this.doors = doors;
}
}