Java ThreadGroup getName() method
The getName() method of ThreadGroup class returns the name of this thread group.
This method returns the name of thread group.
ExampleTest it Now
First threadGroup's name: Parent thread Thread-1 is running Second threadGroup's name: Child thread Thread-2 is running