This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hmm, I found your 2nd Thread example very interesting. Would I be right in assuming that the synchronized method is a bit of a Red Herring. Since the two new Thread Objects have not called start() then they are not currently running Threads. Calling the run() methods of each Thread object is perfectly legal as they are JUST methods of the object, but they won't be running as part of their Threads. Therefore I assume we still have just the user Thread running and hence the two calls to run() will happen one after the other, not concurrecntly, hence the output. If this is correct I can see how the Sun exam is really testing people, as these are not issues dealt with in the books, but something you really need to work out at the time using the knowledge you have. Please reply if this is correct BTW.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com