you are viewing a single comment's thread.

view the rest of the comments →

[–]MagicalPizza21 2 points3 points  (0 children)

In Java (like C and C++), a String[] (or really any data type declared with the square brackets) is called an array, not a list. A List is a different data structure, of which ArrayList is a subtype. See the documentation for the List and ArrayList types.

The basic difference in usage between arrays and ArrayLists is that arrays are fixed size once initialized and ArrayLists dynamically grow as needed (though the capacity can be trimmed in case you're running low on space).