๐Ÿ’ปap computer science a review

Mutator

Written by the Fiveable Content Team โ€ข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโ€ขWritten by the Fiveable Content Team โ€ข Last updated September 2025

Definition

A mutator, also known as a setter method, is a method in a class that modifies the value of an instance variable. It allows us to change the state of an object after it has been created.

"Mutator" also found in: