class isci1 extends Thread 
{
 String isim;
 public isci1(String isim1)
 {isim=isim1;}
 
 public void run()
 { for(int i=0;i<5;i++) {
	 try
	 {
	 if(isim.equals("ali")) Thread.sleep(1000);
	 if(isim.equals("veli")) Thread.sleep(2000);
     } catch(InterruptedException ex) {System.out.println("error...");}
	 System.out.println(this.getName()+"-->"+i);}}
}

public class C14E2
{
public static void main(String args[])
{isci1 i1=new isci1("ali");
 isci1 i2=new isci1("veli");
 i1.start();
 i2.start();
}
}
