Selasa, 22 November 2016

How to group threads in Java Programming

In this article we will learn what is a thread group? How to work with thread groups in Java along with example program.   A thread group is a collection of threads. A thread group allows the programmer to maintain a group of threads more effectively. To support thread groups Java provides a class named ThreadGroup available in java.lang package.   Some of the constructors available in ThreadGroup class are: ThreadGroup(String group-name) ThreadGroup(ThreadGroup parent, String group-name)   After creating a thread group using one of the above constructors, we can add a thread to the thread group using one of the following Threadconstructors: Thread(ThreadGroup ref,

The post How to group threads in Java Programming appeared first on Coding Security.


How to group threads in Java Programming
read more

Tidak ada komentar:

Posting Komentar