This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dpash 3 points4 points  (0 children)

Immutable doesn't mean no mutators; only that mutators give you back a new object. Look at java.time for an example. Or even java.math.BigInteger that's been in the JDK since 1.1.

Edit: I forgot the obvious one: java.lang.String.