1/8
Flashcards reviewing key concepts regarding mutable and immutable objects in Java.
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 have their state or data fields changed after they are created.
Accessor Methods
Public methods used to retrieve the values of private data fields.
Mutator Methods
Public methods that change the values of private data fields in a class.
Immutable Objects
Objects that, once created, cannot have their state or data fields changed.
Reference Variable
A variable that holds the memory address of an object rather than the object itself.
getFirst() Method
An accessor method that returns the first name from the Name class.
setFirst(firstName) Method
A mutator method that sets the first name in the Name class.
getImmutable() Method
Part of the ImmutableName class that retrieves the immutable object.
toString() Method
A method that provides a string representation of an object.