Different b/w Array List and LinkedList?
Array List:
- ArrayList is a class.
- ArrayList is a Java.util package.
- ArrayList maintain the insertion order.
- ArrayList class implements the list interface. 5.It uses a dynamic array to store the duplicate elements of different data types.
LinkedList
- LinkedList is a class
- LinkedList is a Java.util package.
- LinkedList maintain the insertion order.
- LinkedList is allowed the "Null"value morethan time.
- LinkedList is allowed the duplicate value.
LinkedHashSet
- LinkedHashSet is a class
- LinkedHashSet is a Java.util package.
- LinkedHashSet maintain the insertion order.
- LinkedHashSet is allowed the "Null"value but one time only allowed.
- LinkedHashSet is not allowed the duplicate value.
- "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)