class worker1 extends Thread 
{ String name;
  public worker1(String s)
  {name=s;}
 public void run()
 { for(int i=0;i<5;i++) 
 { 	 try
	 {
	 if(name.equals("ali")) Thread.sleep(1000);
     else if(name.equals("veli")) Thread.sleep(2000);
     else Thread.sleep(3000);
     } catch(InterruptedException ex) {System.out.println("error...");}
	 System.out.println(name+"-->"+i);}}
}

public class H11Ex2 
{
public static void main(String args[])
{worker1 i1=new worker1("ali");
 worker1 i2=new worker1("veli");
 worker1 i3=new worker1("zeynep");
 i1.start();
 i2.start();
 i3.start();
}
}
