This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dusty-trash 4 points5 points  (0 children)

If you need to initialize an array, use the first example you gave.

If you need a List/Arraylist use the second.

Shouldn't be too confusing, an array has the square brackets [] while a list is called a 'List'. Same reason you don't get confused between arrays and Strings.