What is the Purpose of Thread Groups in Java ?

In Java, every thread belongs to a group of threads...

The JDK class java.lang.ThreadGroup provides methods to handle a whole group of Threads. With the help of these methods we can interrupt all threads of a group or set the maximum priority of all threads of a group.

So a thread group is used for taking collective actions on a group of threads.



You May Interest

What is the Difference Between Queue and Stack Data Structures in ...

How remove Method is Implemented in a HashMap in Java ?

What is the Difference Between JDK And JRE ?

What is the Difference Between Fail-fast and Fail-safe Iterator i ...

How Will You Define the Scope of a Bean in Spring ?