Quantcast
Channel: When to use LinkedList over ArrayList in Java? - Stack Overflow
Viewing all articles
Browse latest Browse all 35

When to use LinkedList over ArrayList in Java?

$
0
0

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 this, I can rework my code.

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


Viewing all articles
Browse latest Browse all 35

Latest Images

Trending Articles





Latest Images