A quick question, what will happen if i invoke setName(String) API on a thread instance after it has been started via "start()". Will the name be at on the thread and printing it would print the new name? or the name can not be set after the thread has been started?
Yes,Inside your run() method you can access the Current thread and reset the name of it.This will print the new Thread Name.
Thread currentThread = Thread.currentThread();