The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2000

Advertisement

Advertisement
where you can ask and answer Java programming questions.">
artima.com - a resource for Java and Jini developers
Artima | Search | Java | Design | JVM | Jini | Books | Seminars | Subscribe 


Java Answers Forum
April 2000

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:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us