This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Does anybody know why an Interrupted Exception is thrown here.
The only explanation I have is that due to the two distinct run methods and the InnerRunTwo's thread relationship to InnerRun, follows that when I invoke the first Thread t, it will disrupt the Thread 'u', but I'm not sure.
Thanks for comments. [ July 27, 2008: Message edited by: Klemens Katterbauer ]
Klemens Katterbauer<br />Student of Mathematics,<br />University of Vienna
The exception cannot be thrown in this code. This code simply doesn't compile, because according to Thread.join() api, join() throws the checked InterruptedException that must be catch in your code or must be declared to be thrown by run() method. Surround other.join() statement with try-catch, like this:
Java requires that if a method throws an exception, you must either include it in a try/catch block, or declare that your method that's calling the "unsafe" method throws that exception. It's part of java's syntax.