Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

ArrayList, LinkedList and Vector in Java

Share this post!
 Vote this!

The ArrayList class and the LinkedList class are concrete implementations of the List interface. Which of the two classes you use depends on your specific needs. If you need to support random access through an index without inserting or removing elements from any place other than the end, ArrayList offers the most efficient collection.
If, however, your application requires the insertion or deletion of elements from any place in the list, you should choose LinkedList. A list can grow or shrink dynamically. An array is fixed once it is created. If your application does not require insertion or deletion of elements, the most efficient data structure is the array.  more...

0 comments:

Post a Comment