Javatpoint Logo
Javatpoint Logo

Java ThreadGroup activeGroupCount() method

The activeGroupCount() method of ThreadGroup class returns an estimate of the number of active groups in this thread group and its subgroups. The returned value is only an estimate because the number of thread groups may change dynamically while this method traverses internal data structures.



It returns the number of active thread groups with this thread group as an ancestor.


Test it Now


Thread-1 starts
Number of active thread group: 2
Thread-1 completed executing

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA