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

These are obvious examples of accessor methods. As they simply return the values of instance fields, they are sometimes called field accessors.


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


With a getter, program can track the calling times of fields.