This is one of the important thinks that we need to know when we talk about Collections in Java.
There are so many similarities in ArrayList and LinkedList like they implements List interface.
They both come under non synchronized classes.
Now we are talking about differences
Dynamic array is used to store data internally in ArrayList but doubly linked list implements in
LinkedList.
ArrayList is slow in terms of manipulation of data But In case of LinkedList manipulation is
faster. Bit shifting happens in case of ArrayList.
If we want to store and then access the data the performance of ArrayList is better.
ArrayList implements only List so can take only benefits of List, on the other hand LinkedList
implements List and Deque so can take benefits of both.
0 Comment(s)