76
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
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
Next TopicMultithreading Java