Thread priority

Thread priority


Thread priority

  • Each thread has a priority.
  • It starts from 1 to 10 and the highest priority is 10 while the lowest is 1.
  • The default priority of the main thread is 5.
  • If you set the thread priority out of 10, it will give a compile-time error
Exception in thread "main" java.lang.IllegalArgumentException

0 comments :

Post a Comment