Home When to use LinkedList over ArrayList in Java?

When to use LinkedList over ArrayList in Java?

user6885
1#
user6885 Published in September 19, 2018, 3:46 am

I've always been one to simply use:

List<String> names = new ArrayList<>();


I use the interface as the type name for portability, so that when I ask questions such as these I can rework my code.

When should LinkedList be used over ArrayList and vice-versa?