Javatpoint Logo
Javatpoint Logo

Java Thread toString() method

The toString() method of thread class is used to return the string representation of the thread, including the thread's name, priority and thread group.

Syntax

Return

This method returns a string representation of the thread.

Example

Test it Now

Output:

Thread[Thread-0,5,main]






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