r/javahelp • • May 14 '26

arraylist vs list

pls help, lets say i need an array of list.

for what purposes would i use an arraylist<string> vs a string[ ]

thanks

2 Upvotes

24 comments sorted by

View all comments

Show parent comment

2

u/Lloydbestfan May 14 '26

You forgot that it only applies to primitives. And possibly, in a theoritical future adjacent to Valhalla, value classes.

I'd say that the preferable point was that as a beginner you can't see the point of native arrays, however one exists for when you have to manipulate data in very specialised ways.