Saturday, Apr 21st

Last update12:59:40 PM GMT

List

Write e-mail

List is a Collection which maintains all elements in an order. That is, each element has a specific position and it can be referenced by its position index. A List can have duplicate elements, unlike Sets. There is special Iterator for List, ListIterator, which allows backward iteration. There are three implementations of the interface List, as stated below:

argaiv1779

  • ArrayList
    • Implementation based on dynamically resizable arrays
    • Position based access has constant time performance
  • LinkedList
    • Implementation based on doubly-linked list
    • Insertions and deletions are efficient, elements are not shifted
    • Position based access has linear time performance
  • Vector
    • Thread safe
    • Implementation based on dynamically resizable arrays
    • Suffer a performance penalty due to synchronization
    • Position based access has constant time performance

Share this post



Add comment

Please refrain from using slang or abusive language in the comments.
To avoid waiting for your comment to be published after being reviewed, please log in as a registered user.


Security code
Refresh

Web Hosting