Professional Documents
Culture Documents
09 Act
09 Act
Scanner;
public class Thread1 extends Thread{
@Override
public void run(){
System.out.println("");
System.out.println(Thread1.currentThread().getName()) ;
}
t1.setName(Name1);
t2.setName(Name2);
t3.setName(Name3);
t1.setPriority(priority1);
t2.setPriority(priority2);
t3.setPriority(priority3);
System.out.println("");
System.out.println("Starting the threads...");
t1.start();
t2.start();
t3.start();
}
}