Thread Priority and Scheduling in Java Programming
Previous | Home | Next |
Java allow programmer to set the priority of threads .It is an integer value between MIN_PRIORITY(0) and MAX_PRIORITY(10).
These constants are defined as final static in the Thread class. The default priority of a thread is NORM_PRIORITY(5) .We can change the thread priority by using setPriority() method. To execute a thread Java uses preemptive scheduling approach to scheduling the execution.
Previous | Home | Next |