2 ms·
As Josh Bloch said: Classes should be immutable unless there's a very good reason to make them mutable Immutability makes life a LOT easier. A great example i
by ddeck 13y ago
As Josh Bloch said:
Classes should be immutable unless there's a very good reason to make them mutable
Immutability makes life a LOT easier. A great example is the well designed joda-time vs the disaster that is the the mutable Date and Calendar core language classes.
- ScottBurson 13y agoYes. Now if only the standard Java collections were immutable...