package Threadsdeamon;
public class mainclass {
public static void main(String[] args) {
// TODO Auto-generated method stub
Thread t=new Thread1();
Runnable t2=new Thread2();
t.setDaemon(true);
t.start();
new Thread(t2).start();
if(t.isDaemon()){
System.out.println("Daemon thread is still alive");
}
}
}
>>>------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment