DEV Community

velvizhi Muthu
velvizhi Muthu

Posted on

Different

Different b/w Array List and LinkedList?

Array List:

  1. ArrayList is a class.
  2. ArrayList is a Java.util package.
  3. ArrayList maintain the insertion order.
  4. ArrayList class implements the list interface. 5.It uses a dynamic array to store the duplicate elements of different data types.

LinkedList

  1. LinkedList is a class
  2. LinkedList is a Java.util package.
  3. LinkedList maintain the insertion order.
  4. LinkedList is allowed the "Null"value morethan time.
  5. LinkedList is allowed the duplicate value.

LinkedHashSet

  1. LinkedHashSet is a class
  2. LinkedHashSet is a Java.util package.
  3. LinkedHashSet maintain the insertion order.
  4. LinkedHashSet is allowed the "Null"value but one time only allowed.
  5. LinkedHashSet is not allowed the duplicate value.
  6. "removeFirst" is removed the first index and no need to mention the index value. 7."removeLast" is removed the last index and no need to mention the index value.

Top comments (0)