Javatpoint Logo
Javatpoint Logo

Java ThreadGroup getName() method

The getName() method of ThreadGroup class returns the name of this thread group.

Syntax

Return

This method returns the name of thread group.

Example

Test it Now

Output:

First threadGroup's name: Parent thread
Thread-1 is running
Second threadGroup's name: Child thread
Thread-2 is running






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