aspose file tools
The moose likes Beginning Java and the fly likes ArrayList vs LinkedList Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "ArrayList vs LinkedList" Watch "ArrayList vs LinkedList" New topic
Author

ArrayList vs LinkedList

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,


i do not thing there is much different between ArrayList and LinkedList..


commonly we are using ArrayList..please can anyone tell me,in which scenario we go for LinkedList?

Thanks & Regards,
seetharaman.v
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1220

Hi seetharaman,

when you use ArrayList and LinkedList only as "List" interface there's indeed no big difference between them - regarding the API. But there's a big difference how they are implemented! Usually you shouldn't have to worry about the implementations of an interface but the different collection classes make a big difference regarding performance of one or another method. Some collections allow you very fast insertion other give you very fast indexed access and so on. So you should reasonably decide which collection implementation is best for you requirements because there's simply no algorithmic solution which is THE best for everything one can imagine.

You'll find more detailed information in API documentation of the classes.

Marco
[ June 02, 2008: Message edited by: Marco Ehrentreich ]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Thanks Marco
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: ArrayList vs LinkedList
 
Similar Threads
ArrayList and LinkedList
advantage Doublylink list over linklist
What is the difference between LinkedList and ArrayList ?
Difference between ArrayList and LinkedList?
ArrayList vs LinkedList !!