This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
RE: Mutable versus Immutable Objects
Posted by Lutz Ihlenburg on April 26, 2000 at 9:50 AM
Hello Bill, thanks for answering my question > If there is no solution: Why may one make something in Java > with arrays, what is forbidden with normal objects? Your answer was: --snip > Class Integer happens to be immutable. Once it is created with > a value, it can't change. Arrays are always mutable. --snip Is there for it a simple reason? I cannot believe that it is so difficult to implement a simple algorithm calculating two or more integers. Sincerely Lutz
Replies:
|