Is there a way that I can get the number of threads currently executing within the JVM?
Created May 8, 2012
Brandon Rohlfs
You can use activeCount() for this. activeCount() returns the number of active threads that are part of the current thread's thread group.
static int activeCount()