ArrayList_LinkedList_Compared1
Connecting Dots:
  • Collection, as goes the name, is a collection of chain of objects/elements having some kind of algorithm or sequence or pattern.

     
  • List: A List is an ordered Collection, may contain duplicate elements. Elements can be inserted or accessed by reference point in the list. List uses a zero-based index.
  • Set: is a collection, resembles, List, but can't have duplicate elements. There three main implementations of "Set"
    • HashSet
    • LinkedHashSet
    • TreeSet :
  • Map : Keys to Values,
    • HashMap: 
    • TreeMap, and
    •  LinkedHashMap
  • ArrayList :: The class "ArrayList"  is the resizable array implementation of list interface




    •  
  • LinkedList : Ref : OracleLinkedList Doubly-linked list implementation of the List and Deque interfaces

     
List:

LinkedList:

Arraylist: Allows data to be added at the end of the list, where as LinkedList allows data insertion at a reference node or location.

Example: source class

calling from main function:

output in console pane: