well you can create only user threads i.e. they are not daemon threads.
Priority of these threads depends upon the priority of the thread which has created this one.
for ex :
let priority of Thread-1 is 4 and it creates another thread Thread-2 . then priority of Thread-2 will be 4 by default.
well you can set the priority using setPriority() method.
Any thread started by a non daemon thread, will be a non daemon thread. Main is a non daemon thread and will thereby create non daemon threads. I have never created daemon threads of my own at work, because there was never a need to.
avi sinha wrote:well you can create only user threads i.e. they are not daemon threads.
Priority of these threads depends upon the priority of the thread which has created this one.
The method setDaemon(boolean) is used to make either a user or a daemon thread. It should be set before the thread starts.