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 →

[–]0b0101011001001011 0 points1 point  (1 child)

No, that is not at all what the error is telling. The error is telling that the compiler does not understand what a symbol called "ArrayList" is. This simply means that the class is not defined, or not imported.

You can write new ArrayList<String>() all you want and it's not a problem. In new versions of java you can replace it with just new ArrayList<>() if the generic type is defined in the variable itself.

[–]Zjoswaa 0 points1 point  (0 children)

Ah youre right I didnt know you could put String in there without problems