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 {
    /***/
    public static Thread[] createThreads(Runnable runnable, int threadCount) {
        Thread[] ret = new Thread[threadCount];
        for (int i = 0; i < threadCount; i++) {
            ret[i] = new Thread(runnable);
        }
        return ret;
    }

    /***/
    public static Thread[] createThreads(Runnable... runnables) {
        Thread[] ret = new Thread[runnables.length];
        for (int i = 0; i < runnables.length; i++) {
            ret[i] = new Thread(runnables[i]);
        }
        return ret;
    }
}