Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread priority

 
Angela Narain
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever a new Thread is created it get Normal Priority (5)
Is this right ?
 
anita narula
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it is not right. If the newly created thread is not set a priority in the constructor, then it gets the priority of the thread that created it.
 
Ash sav
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Angela.
If no explicity thread priority is specified for a thread, it is given the default priority of 5.Thread inherits the priority of its parent thread.
Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic