What is difference between ArrayList and Linked List?

ArrayList vs LinkedList
1. The underlying data structure is resizable or growable array.
The underlying data structure is Double Linked List.
2. This is Best choice if frequent operation is retrieval and worst choice if frequent operation is insertion or deletion in the middle.
This is Best choice if frequent operation is insertion or deletion in the middle and worst choice if frequent operation is retrieval .
3. This class implements Serializable , Cloneable and RandomAccess interfaces.
This class implements Serializable , Cloneable but not RandomAccess interface.

1 comment:

  1. You have a wonderful blog and it is quite unique and interesting. Keep it up and hope to read more updates from your blog.


    Jim
    www.imarksweb.org

    ReplyDelete