• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

ArrayList vs LinkedList

 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marco
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic