Originally posted by vinay prasad:
The object still keeps running until the object is not reached by the any live reference.
Hi Vinay,
Welcome to JavaRanch!
I wanted to point out that as long as a Thread is running, it will be referenced by its ThreadGroup, and as long as a ThreadGroup contains at least one running thread it, in turn, is referenced by its parent ThreadGroup; therefore, Jose is quite correct in stating that the Thread will continue to run forever (until, of course, something happens to make it stop.) The important point is that under no circumstances will the GC collect a running Thread; it's designed that way quite deliberately.