The difference between Accessor and Mutator

When used as nouns, accessor means someone or something that accesses, whereas mutator means that which causes mutation or change.


check bellow for the other definitions of Accessor and Mutator

  1. Accessor as a noun:

    Someone or something that accesses.

  2. Accessor as a noun (object-oriented programming):

    A function that retrieves a value, usually without changing any data.

  1. Mutator as a noun:

    That which causes mutation or change.

    Examples:

    "In object-oriented programming, the mutator function changes the value of the field that gives its name."

Compare words: