I have a linked list samples:
protected LinkedList samples = new LinkedList();
I\'m append
That is correct - LinkedList is not synchronized and thus not thread safe. If you do not want to use the newer synchronized analogies of LinkedList, namely, ConcurrentLinkedQueue or LinkedBlockingQueue, you can initialize LinkedList like this:
LinkedList samples = (LinkedList)Collections.synchronizedList(new LinkedList());