get Thread Count - Java java.lang

Java examples for java.lang:Thread

Description

get Thread Count

Demo Code

/**/* ww w . j  a v a  2 s .com*/
 * Project: richContentMediaSearchService
 * ROLE-Project
 * authors: daniel.dahrendorf@im-c.de, julian.weber@im-c.de
 * This software uses the GNU GPL   
 */
//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        System.out.println(getThreadCount());
    }

    public static int getThreadCount() {
        return Thread.activeCount();
    }
}

Related Tutorials