9:13 am - Sunday March 26, 2017

Java program for daemon thread

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

package Debug;

public class DaemonThread extends Thread {
/**
* @author: candid
* @description: java program for daemon thread.
*/
DaemonThread() {
setDaemon(true);
}

public void run() {
System.out.println("Is this thread Daemon? - " + isDaemon());
}
}

Output:

Is this thread Daemon? – true

 

Filed in: Sample Programs in java

Comments are closed.