• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

LinkedList and ArryList

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the difference between LinkedList and ArryList?

pls tell me it's urgent
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lookup the API documentation of those classes; it explains exactly how each of the classes works. Also read the documentation on the collections framework.

"pls tell me it's urgent"
Ease Up
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rajesh kumar rayavarapu:
...pls tell me it's urgent


"It's urgent."
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They are both a part of Collection framework(LIST). Each ahs it's own advantage and disadvantage-

If you want a quick retreival of objects, use ArrayList.
If you have to do plenty of additiona and deletion, you can use Linked list
ArrayList does not maintain any order while inserting.
LinkedList manitian insertion order and can also sort itslef optionally to most recently access value.

It's a designing factor you might need to consider to improve the performance of a application/project.

Thanks,
Dinesh

SCJP 1.4
 
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ArrayList does not maintain any order while inserting.



Thats incorrect. All implementations of the List contract maintain a well defined order.
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic