.toString() method is called and .toString() on a thread object
Returns a string representation of this thread, including the thread's name, priority, and thread group.
Default priority for any thread object is 5; thats how it appeared in the output.
try printing threadMain.getPriority();
you can set priorities to the threads using setPriority(int priority) method. Always use priority constants provided by the class Thread(Ex: Thread.MAX_PRIORITY)
try printing the following lines of code
System.out.println(Thread.NORM_PRIORITY);//default priority 5
System.out.println(Thread.MAX_PRIORITY);//returns 10
System.out.println(Thread.MIN_PRIORITY);//returns 1