Can we able to change the name of main thread?
and in main method
Thread t = Thread.currentThread();
System.out.println(t);
It prints :
Thread[main,5,main]
– here first thread name , second priority, third is thread group to which current thread belongs to.
Is it right?
What is thread group the third parameter?
From the Javadoc for Thread
and
prints
To change the ThreadGroup’s name you could use reflection but that’s unlikely to be a good idea.