Section 8.7 Notes on Set and Get Methods

Set methods are commonly called mutator methods (p. 331) because they typically change a value. Get methods are commonly called accessor methods (p. 331) or query methods. A predicate method (p. 332) tests whether a condition is true or false.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.