While reading Flea "Effective java" I encountered the definition of Mutator. If I understand the context correctly, this is an ordinary setter ("setter") and this is a kind of inaccuracy of translation. But it is often found that the definition of the setter is used.

In the end - is it an inaccuracy of the translation or something I did not understand correctly? Or is it all the same Mutator - is it any method that changes the internal state of the object and its variables, respectively, the setter is just a kind of mutator?

  • Advise where you can learn more about the many mutators (what they are, etc.). I don't want to have linguistic gaps in definitions - abbath0767 September
  • one
    I regret to say that it seems I misled you. Ksenia is absolutely right - mutator and setter are synonyms. Live and learn. - rjhdby
  • @rjhdby understood, thanks. So even easier) - abbath0767

1 answer 1

In this case, the mutator and setter are simply synonyms.