O'Reilly logo
  • You Wang thinks this is interesting:

You may need to get and set an employee’s salary. You certainly won’t need to change the hiring date once the object is constructed. And, quite often, objects have instance fields that you don’t want others to get or set, such as an array of state abbreviations in an Address class.

From

Cover of Core Java® Volume I—Fundamentals, Tenth Edition

Note

Some fields in logic shouldn't be changed.