start Daemon Thread - Java java.lang

Java examples for java.lang:Thread

Description

start Daemon Thread

Demo Code


//package com.java2s;

public class Main {
    private static Thread startDaemonThread(Runnable runnable) {
        Thread result = new Thread(runnable);
        result.setDaemon(true);/*from   w ww  .  j a  v a 2  s .  c  o m*/
        result.start();
        return result;
    }
}

Related Tutorials