In my program I often use collections to store lists of objects. Currently I use ArrayList to store objects. My question is: is this a best choice? May be its better to use LinkedList? Or something else?
Criteria to consider are:
Operations which I need are:
Any thoughts?
Update: my choice is : ArrayList :) Basing on this discussion as well as the following ones:
I always default to ArrayList, and would in your case as well, except when
As to what to pick in that second case, this SO.com thread has some useful insights: List implementations: does LinkedList really perform so poorly vs. ArrayList and TreeList?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With