74
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
Output:
Thread[Thread-0,5,main]
Next TopicMultithreading Java