Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /** runs as a daemon (will not keep JVM running). */
    public static Thread runAsThread(Runnable runnable) {
        return runAsThread(runnable, true);
    }

    public static Thread runAsThread(Runnable runnable, boolean daemon) {
        Thread thread = new Thread(runnable);
        thread.setDaemon(daemon);
        thread.start();
        return thread;
    }
}