Hello
sleep() in Thread may throw an InterruptedException.If some Threads want
to disorder in Defered thread,this state occured.
For example how "main thread" can() in work of "CounterThread"?

Java Code:
import java.lang.Runnable;

class Counter implements Runnable {
	
      public int count = 1;
      Thread t;
      Counter()
      {
      	t=new Thread(this,"CounterThread");
      	t.start();
      }
      
      public void run()
      {
          while (count < 3)
          {
              try
              {
              	System.out.println(count);
                Thread.sleep(4000);
              } 
              catch (InterruptedException e)
              {
              	System.out.println("InterruptedException"); 
              }
              count++;
        }
        System.out.println("+");  
    }
  } 

public class B
{
	public static void main(String args[]) throws Exception
	{
		Counter  r = new Counter();
		for(int i=0;i<5;i++)
		{
			Thread.sleep(1000);
	   	System.out.println("i= "+i);
	  }
	}
}