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 method, also known as a setter method, is a type of method in object-oriented programming that is responsible for modifying the value of an object's attribute.
Related terms
Attribute: An attribute is a characteristic or property associated with an object. It represents data that describes the state of an object.
Encapsulation is one of the principles of Object-Oriented Programming (OOP). It refers to the bundling of data and methods within a class, providing control over access to the internal state of objects.