💻ap computer science a review

Set Method (Mutator)

Written by the Fiveable Content Team • Last updated August 2025
Verified for the 2027 exam
Verified for the 2027 examWritten by the Fiveable Content Team • Last updated August 2025

Definition

A set method, also known as a mutator, is a method in object-oriented programming that allows the modification of an object's attributes or properties. It is used to update the values of instance variables within an object.

AP course connection

Topic 3.3: 3.3 Anatomy of a Class

Unit 3

"Set Method (Mutator)" also found in:

2,589 studying →