is there any way to confirm if the thread is killed at the end of execution?
<p>is there any way to confirm if the thread is killed at the end of execution? If the garbage collector takes  long time to destroy the threads even when they are available for GC, out of memory exceptions may arise. to get rid of those kind of issues, it would be good to know if the threads have been destroyed. </p>

<p>As of now, my understanding is that at the end of run method , the thread gets killed and we need not do anything explicitly to kill the thread instance. </p>

<p>Thanks in advance!</p>

<pre><code>class A
{
    public static void main()
    {
        Thread t = new Thread(new TestA());
         t.start();
        Thread t1 = new Thread(new TestB());
         t1.start();
        Thread t2 = new Thread(new TestC());
         t2.start();
    }
}
class TestA implements Runnable {
Thread t;

    public void run() {
           for(...){
           try{

           }catch()
           {
            ....
           }
           } 
        }

 }
</code></pre>
