Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getAllThreadNames() {
        Thread[] array = new Thread[Thread.activeCount()];

        Thread.enumerate(array);

        String s = "";
        for (Thread t : array) {
            if (t != null) {
                s += t.getName() + ", ";
            }
        }
        return s;
    }
}