5.5 Mutator Methods
Enduring Understanding
Programmers use code to represent a physical object or nonphysical concept, real or imagined, by defining a class based on the attributes and/or behaviors of the object or concept.
Learning Objective
Define behaviors of an object through void methods with or without parameters written in a class.
Essential Knowledge
A void method does not return a value. Its header contains the keyword void before the method name.
A mutator (modifier) method is often a void method that changes the values of instance variables or static variables.
Last updated
Was this helpful?