0

Whats the different between arraylist and linkedlist in java

Differents of arraylist and linkedlist

19th Apr 2019, 6:11 AM
Tzion
Tzion - avatar
1 Answer
+ 3
As I found it's about performance. If you use method get(int index) in ArrayList it gives you performance of O(1) while linkedlist performance is O(n). More here: https://beginnersbook.com/2013/12/difference-between-arraylist-and-linkedlist-in-java/
19th Apr 2019, 7:11 AM
Adam Priesnitz
Adam Priesnitz - avatar