Fiveable
Fiveable

Mutable Object

Definition

A mutable object is an object whose state can be modified after it is created. In other words, you can change the values of its attributes or properties.

Analogy

Think of a whiteboard that you can write on and erase. You can modify the content on the whiteboard by adding or removing information as needed.

Related terms

Immutable Object: An immutable object is the opposite of a mutable object. Once an immutable object is created, its state cannot be changed.

Attribute: An attribute refers to a characteristic or property of an object. It represents the data associated with the object.

Method: A method is a set of instructions that defines what actions an object can perform. It represents the behavior of an object.

"Mutable Object" appears in:

collegeable - rocket pep

Are you a college student?

  • Study guides for the entire semester

  • 200k practice questions

  • Glossary of 50k key terms - memorize important vocab



© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.