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.
Dead A thread is considered dead when its run() method completes. It may still be a viable Thread object, but it is no longer a separate thread of execution. Once a thread is dead, it can never be brought back to life! (The whole "I see dead threads" thing.) If you invoke start() on a dead Thread instance, you�ll get a runtime (not compiler) exception.
The answer to this is (from "Java Threads, 2nd Edition" by S. Oaks and H. Wong, Chapter 2.6)
What happens when you try to restart a thread? The answer is that it actually depends on when you restart it ... it actually takes time for a thread to stop. ... If the start() method is called after the stopping thread has actually stopped, nothing happens: the thread object is in a state where it cannot be restarted
Can an exam question go into such low level details?
Gian Franco [ May 20, 2004: Message edited by: Gian Franco Casula ]