main difference betn LInked list and array list

hiIN which place array list and linked list should be used?tell me with simple example
[107 byte] By [kasdeepaa] at [2007-11-26 18:30:52]
# 1
NO one is ready to anwer!!!!!!!!!
kasdeepaa at 2007-7-9 6:05:01 > top of Java-index,Java Essentials,New To Java...
# 2
http://java.sun.com/developer/JDCTechTips/2002/tt0910.html http://narencoolgeek.blogspot.com/2006/09/arraylist-vs-linkedlist.htmlgoogled...CheersAlex
alexcurtisa at 2007-7-9 6:05:01 > top of Java-index,Java Essentials,New To Java...
# 3

You should really learn about how those two are implemented and learn what that means. Otherwise each answer will just seem like arcane knowledge to you.

Basically:

* Appending is cheap on both (it can be moderately expensive with an ArrayList, but on average it's cheap).

* Inserting at the beginning (or anywhere, but the end) is cheap with an LinkedList, and expensive with an ArrayList

* Getting an Element from the middle of the List is expensive with a LinkedList and cheap with an ArrayList

* Iterating over it is cheap with boths

JoachimSauera at 2007-7-9 6:05:01 > top of Java-index,Java Essentials,New To Java...