previous |
start |
next
Accessor and Mutator Classes
- Accessor: does not change the state of the implicit parameter
(e.g. getBalance)
- Mutator: changes the state of the implicit parameter (e.g.
deposit )
- Rule of thumb: Mutator should return void
- Immutable class: all methods are accessors (e.g.
String)
previous |
start |
next