BAEL4235 FindNumberOfThread class
This commit is contained in:
parent
f656c61903
commit
830940fac9
@ -6,7 +6,9 @@ public class FindNumberOfThreads {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Number of threads " + Thread.activeCount());
|
||||
System.out.println("Current Thread Group - " + Thread.currentThread().getThreadGroup().getName());
|
||||
System.out.println("Total Number of threads " + ManagementFactory.getThreadMXBean().getThreadCount());
|
||||
System.out.println("Current Thread Group - "
|
||||
+ Thread.currentThread().getThreadGroup().getName());
|
||||
System.out.println("Total Number of threads "
|
||||
+ ManagementFactory.getThreadMXBean().getThreadCount());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user