Javatpoint Logo
Javatpoint Logo

Java ThreadGroup toString() method

The toString() method of ThreadGroup class returns a string representation of the Thread group.

Syntax

Return

It returns the string representation of the thread group.

Example

Test it Now

Output:

Thread-1 starts
Thread-2 starts
String equivalent: java.lang.ThreadGroup[name=parent thread group,maxpri=10]
String equivalent: java.lang.ThreadGroup[name=child threadGroup,maxpri=10]
Thread-1 completed executing
Thread-2 completed executing





Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA