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.
Hi All, Need to know about Thread.isAlive() method As we know that we cannot re-start a thread once it has executed a run method, i.e., it is not alive after its dead. Check the code below..
the output of the code is : 1 = false 2 = true // as start method called In run method 3 = false // run method is completed 4 = true ??? This is showing the thread is alive but run method did not execute again.
Hai Cody, When I executed the same program the output was 1= false 2= true 3= false 4= false Probably the second start() didn't make the thread alive here. Why is this difference? Anyway this shouldn't be platform dependent. Am I right?