Paul Clapham wrote:But in real life, since the question is probably quite unimportant, the programmer would just pick something reasonable and carry on until it was proven to be a bad choice. At that time the programmer would refactor to use some better choice.
What Paul said. If you're nervous about your choice surviving for the long term, just make sure your accesses are all easily converted from one choice to the other. ArrayList and array objects are similar enough that you might not need to do much, but you could write wrappers for your get, insert, add, etc. operations, which would allow you easily to convert from one choice to another by changing a small amount of code in just a few places (that is, in each of your wrappers).
I predict, however, that no matter which choice you make, you'll never need to change it. There was a time when this sort of thing made a big difference in all kinds of applications. For some things, of course, it still does. Just not so many as it used to.
"The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet." -
Michael A. Jackson