public class Thread_Demo extends Thread{
public void run(){
System.out.println("Some text");
}
public static void main(String[] args) throws InterruptedException{
Thread_Demo t=new Thread_Demo();
Thread_Demo td1=new Thread_Demo();
t.start();
System.out.println("ISALIVE :"+t.isAlive());
t.sleep(500);
System.out.println("ISALIVE :"+t.isAlive());
//t.destroy();
t.resume();
System.out.println("ISALIVE :"+t.isAlive());
}
}
U r a great
ReplyDelete