1/9
These flashcards cover key concepts related to mutable and immutable objects in Java as well as related methods and class structures.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Mutable Objects
Objects that can be modified after they are created, typically through public mutator methods.
Immutable Objects
Objects that cannot be modified after they are created; any changes result in a new object.
Accessor Methods
Public methods that retrieve or access private data fields in a class.
Mutator Methods
Public methods that modify or update the private data fields in a class.
Reference Variable
A variable that holds the memory address of an object, enabling access to the object.
getFirst() Method
A method that retrieves the value of the first name in the Name class.
setFirst(firstName) Method
A mutator method that sets the value of the first name in the Name class.
toString() Method
A method that returns a string representation of an object.
giveLastNameTo(aName) Method
A method in the Name class that assigns the last name to another Name object.
Class Diagram for Name and ImmutableName
A visual representation showing the attributes and methods of the Name and ImmutableName classes.