Type a private field with a public getter
Type a private field with a public getter
Answer
private double balance; public double getBalance() { return balance; }
Callers read balance through the getter but cannot write it directly. A setter can enforce business rules like "no negative deposit".