Thank you!
I got the idea so I changed it into something like my 2nd post above. However, the printout is still the same. What I did was,
SyncClass - just ordinary class with the synchronized method.
SyncJob - the Runnable class where SyncClass is instantiated and the synchronized method is called.
And then I realized that I'm still creating two different instances for the threads when the run is called. So I made the SyncClass the Runnable class instead, and removed the SyncJob totally.
The output is OK now. However this is not the design I want. I like to call a synchronized method from other classes that don't implement Runnable, and then see the actual synchronizing take effect. Any idea for this?
[ August 12, 2008: Message edited by: Denise Saulon ]