mutable vs immutable java
- User
mutable vs immutable java
- Assistant
In Java, mutable and immutable refer to an object's ability to be changed or modified.
- Mutable: Mutable objects can be modified or changed after they are created. This means that the state of a mutable object can be updated by modifying its internal variables.
Example:
java