使用下面的代碼是最接近任何解決方案我不斷收到一個錯誤說「(」或「[」預期和在「;」預期。不敢肯定我錯過了什麼我與另一個構造函數調用構造函數有一個錯誤
public class Manager extends SalariedSubordinate implements IManager{
private ArrayList<ISubordinate> listOfSubordinates;
private double managerBonusFund = 5000;
private double baseSalary;
public Manager(double baseSalary, IManager manager, ArrayList<ISubordinate> subordinates) {
this.baseSalary = baseSalary;
this.manager = manager;
this.listOfSubordinates = subordinates;
}
public Manager(double baseSalary, IManager manager){
this(baseSalary, manager, new ArrayList<ISubordinate> subordinates);
}
'new ArrayList下屬不是你如何初始化一個新的'List',mabye試着用'new ArrayList ()' –
SomeJavaGuy