Passing Integer by reference with threads
<p>I have a class with a global variable, Integer clock, initialized to 0. It passes 'clock' to a few thread constructors, starting the threads also. It seems increments to 'clock' can be seen within the thread, but in their calling process, 'clock' is always 0. Because Integer is an object and objects are passed by reference, I would expect changes to 'clock' to be seen everywhere. Is this not the case?</p>
