A local variable can shadow a field with the same name
Local scope wins over class scope
public class Coin { . . . public double getExchangeValue(double exchangeRate) { double value; // Local variable . . . return value; } private String name; private double value; // Field with the same name }
Access shadowed fields by qualifying them with the this
reference