As a demonstration (and because I'm a nerd and find Collections fascinating) this snipped benchmarks one of the differences between LinkedList and ArrayList. This code adds thousands of identical...
Type: Posts; User: copeg
As a demonstration (and because I'm a nerd and find Collections fascinating) this snipped benchmarks one of the differences between LinkedList and ArrayList. This code adds thousands of identical...
Each has its advantage in different situations. All implement List, which is the interface which defines a collection of ordered items. Vector is synchronized so is nice for a multithreading...
I don't think there is, but you could just as easily extend LinkedList and override its add function
@Override
public void add(E object){
super.add(object);
if ( size() > 100){
...