{{theTime}}

Search This Blog

Total Pageviews

How to find number of threads running in JVM?

Try this:


 ThreadGroup tgroup = Thread.currentThread().getThreadGroup();
 while(tgroup.getParent() != null) {
 tgroup = tgroup.getParent();
 }
 Thread[] t = new Thread[tgroup.activeCount()];
 tgroup.enumerate(t);

No comments:

Java Script GET request Sample Code

fetch(' https://api.public.com/api ')   .then(response => response.json())   .then(data => console.log(data))   .catch(error =...