Java Thread getName() methodThe getName() method of thread class is used to return the name of thread. SyntaxReturnExampleTest it NowOutput: Name of t1: Thread-0 Name of t2: Thread-1 Thread is running... Thread is running... Next TopicMultithreading in Java |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India