Javatpoint Logo
Javatpoint Logo

Java ThreadGroup list() method

The list() method of ThreadGroup class is used to display the information about the thread group. It is useful only for debugging.

Syntax

Return

This method does not return any value.

Example

Test it Now

Output:

Thread-1 starts
Thread-2 starts

Listing parentThreadGroup: Parent thread:
java.lang.ThreadGroup[name=Parent thread,maxpri=10]
    Thread[Thread-1,5,Parent thread]
    Thread[Thread-2,5,Parent thread]
    java.lang.ThreadGroup[name=Child thread,maxpri=10]
Thread-1 completed executing
Thread-2 completed executing






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA