I want to confirm one thing about performance of arraylist.
I have to read a file and get 5000 objects containing two strings each.. and pass it on... I am currently using an ArrayList to pass the objects to the next level.. i wanted to know should i go ahead using ArrayList.?? please advice.. will it be a problem with Heap Space / Memory...
ArrayList is very efficient in terms of storage. It's also very efficient if you need to iterate over the list items in order. It's very inefficient, however, at adding or deleting items from the beginnng or the middle of the list, in which case LinkedList is better (of course, LinkedList uses much more memory per element.)