Getters/setters expose controlled access to fields, but the common habit of adding one for every field is an anti-pattern. The real question is: does the accessor add value, or just re-expose a public field with extra steps?
When a setter is justified
java
{
target;
{
(t < || t > )
();
.target = t;
}
{ target; }
}
