News

Mutable class with a convert-to-immutable-version method The previous pattern is suitable for read-only data whose usage is short-lived (e.g., scoped to a method).
I prefer that all of my Java classes provide for immutable objects unless there is a compelling need for them to be mutable. I’m not the only one who feels this way.