This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DaemonThread implements Runnable { | |
public static void main(String[] args) { | |
Thread th = new Thread(new DaemonThread()); | |
th.setDaemon(true); | |
th.start(); | |
try { | |
Thread.sleep(1000); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); |
NewerOlder