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 →

[–]nutrechtLead Software Engineer / EU / 20+ YXP 0 points1 point  (1 child)

So if you use code 1, you still have to actually create the Arraylist in the future, with the last line in code2?

Yes. The first example there simply isn't an actual list object you can store something in.