public class ArrayWriter
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
ArrayWriter(int startValue,
SimpleArray sharedSimpleArray)
Initializes the starting value for this thread and the array shared
between the threads.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Adds an element to the shared array.
|
public ArrayWriter(int startValue, SimpleArray sharedSimpleArray)
startValue
- the starting value for this threadsharedSimpleArray
- the array shared between the threads