This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Why the following code doesn't block in the wait() method forever?
This issue seems to come up often -- and the quick answer is... The implementation of one of the components of the threading system (in this case, to support the join() method call), uses the wait/notify mechanism. And for some reason, the designer chose to use the thread object as the notification object. This is purely an implementation detail, and hence, may change in the future.
Regardless, don't perform wait() on the thread object, some part of the threading library is already doing that.