Controlled writing: the setter
A setter is a method that changes a private field, giving controlled write access. Because the write goes through a method, the setter can check the value first and reject bad input — something a plain public field could never do. This is a big reason to keep fields private.