i write a program its output is below

G:\Java\Multithreading>java NewThread
Child Thread Thread[main,5,main]
Main Thread 1
Child Thread 1
Main Thread 2
Main Thread 3
Main Thread 4
Main Thread 5
Main Thread Complete
Child Thread 2
Child Thread 3
Child Thread 4
Child Thread 5
Child Thread Complete

in this output i am confuse in this line Child Thread Thread[main,5,main]problem is that first main is the name of thread and second is 5 is priority and third main is confusing for me what is third main please clarify it

That's the thread group name. Always consult the sources when in doubt.

Thread#toString

i think it is a process name in which the thread is create is it write

anybody can answer me of this question

I'm not sure I understand. You asked "what's the 3rd main" to which the answer was "it's the thread-group name". To which you then wrote "i think it is a process name in which the thread is create is it write".

To answer the last statement, no, it's not the process name but the thread group name as mentioned in my previous post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.