There are three parts of the Producer / Consumer example that you will need to modify:
See: http://download.oracle.com/javase/1.4.2/docs/api/java/util/LinkedList.html be sure to read the documentation completely. Your queue will also have to be synchronized. The documentation shows how to do this in this code example:
List list = Collections.synchronizedList(new LinkedList(...));
1 2 3 4 5 6 7 8 9 10 11 12
1 1 2 3 4 5 6 7 8 9 10 11 12
2 2 4 6 8 10 12 14 16 18 20 22 24
etc.
The output from all threads will be written to a file named