Reputation: 696
I think this is very interesting topic. In your choice, then which is better between Vector or synchronized LinkedList?
Synchronized for LinkedList:
LinkedList linkedlist=new LinkedList();
List synchronizedlist= Collections.synchronizedList.(linkedlist);
Upvotes: 2
Views: 228
Reputation: 466
The main difference is their implementation which causes different performance for different operations.
Vector is similar with ArrayList, but it is synchronized.
Syncronized LinkedList is implemented as a double linked list. Its performance on add and remove is better than Arraylist, but worse on get and set methods.
Upvotes: 1