public class Manager extends Employee { public double getSalary() { return salary + bonus; // ERROR - salary is a // private field of Employee } ... }
public double getSalary() { return getSalary() + bonus; // ERROR - need to call super.getSalary() or // else this is a recursive call }