From: <wak...@ea...> - 2005-04-26 20:37:25
|
I believe this is not an issue with Java. Also, this is the difference between an array and an ArrayList. Arrays require size to be set at instantiation, ArrayLists size is changable. ---Brett -----Original Message----- From: John David Galt <jd...@di...> Sent: Apr 26, 2005 1:27 PM To: rai...@li... Subject: Re: [Rails-devel] The Player Class Erik Vos wrote: > Nice, but what is the advantage above a static array? > Looks a lot easier to me. > > I'm getting the impression that 'static' is synonymous to > 'not done' here.... I hope so. The reason for not using static arrays is that they set an unnecessary upper limit on the number of instances, which can fail when temporary copies of a class object are created in situations such as copying a class type (a = b) or when a function returns a value of that type. Some compilers create these temporary copies when others don't, so it's simpler and better just to avoid having the limit. |