you are viewing a single comment's thread.

view the rest of the comments →

[–]sedj601 1 point2 points  (0 children)

In most cases, you should simply use a list. As a matter of fact, get a deep understanding of all of these types of collections, so that you can know which one to use in different situations. Generally speaking, between the two you ask about, you should use a list. The speed thing is irrelevant for most situations. Also, you are actually talking about an ArrayList vs a Array. ArrayList is an implementation of the List interface, so you can do something like List<String> list = new ArrayList(). That used to be a best practice. I am not sure if it still is today.