Multithreading in java watch online session on youtube in Hindi)
How to create thread in javawatch online session on youtube in Hindi)
What is runtime stack in Java?watch online session on youtube in English)
Sleep Method in Java ?watch online session on youtube in English)
What is Java Lock? Or Synchronizationwatch online session on youtube in English)
What is Thread Group in Java?watch online session on youtube in English)
How to get name of a thread? How to set name of a thread?
Every thread in java has some name, it may be default name provided by JVM or by a Programmer.
There are two methods in java to get and set name of a thread:
public final string getName
public final void setName(String Name)
Sample output: