Java Thread related issue
<pre><code>class NewThread implements Runnable {

String name; // name of thread
Thread t;

NewThread(String threadname) 
{ 
name = threadname; 
t = new Thread(this, name); 
System.out.println("New Thread inside constructor: " + t);
t.start(); // Start the thread
} 


public void run()
{
 try 
  { 
    for(int i = 5; i &gt; 0; i--) 
    {
        System.out.println(name + ":(inside run) :" + i); 
        Thread.sleep(10000);
    } 
  } 

 catch(InterruptedException e) 
 {
    System.out.println(name + "Interrupted"); 
 } 

System.out.println(name + " exiting.");
}
}


public class main_thrd
{
 public static void main(String args[]) 
 {
  NewThread obj1 =  new NewThread("One"); // start threads 
  NewThread obj2 =  new NewThread("Two"); 
  NewThread obj3 =  new NewThread("Three");


  try { // wait for other threads to end 
        Thread.sleep(1000005);
      } 
  catch (InterruptedException e) 
     { System.out.println("Main thread Interrupted");
      }
    System.out.println("Main thread exiting.");
    }
  }
</code></pre>

<p>Can anyone plz make me understand the program? specially the <code>Thread.sleep(10000);</code> inside run method. </p>

<p>Moreover,</p>

<ol>
<li><p>In main method, does the objects create at the same time?</p></li>
<li><p>What doeas the Thread indicate inside <code>run()</code> and when does the <code>Thread.sleep(100000)</code> work inside run method?</p></li>
<li><p>Does run always execute when <code>t.start()</code> is called?</p></li>
</ol>
