+ 4

10 is the maximum thread priority. Why? & what is the number 10 denotes?

This question i got in challenges of java so if anyone knows the reason behind this question then pls share with me

19th May 2019, 3:17 PM
sunnym_97
sunnym_97 - avatar
2 Respuestas
+ 3
U can set the priority of your thread from 1(min) to 10(max). If a thread has a priority greater than others , it means its going to get executed first by the processor .
19th May 2019, 4:07 PM
kiRA
kiRA - avatar
+ 2
It is not necesssary that the priority is assigned everytime.setPriority() is the request that we made to the system it depends on system whether to fulfill our request or ignore it.
30th Jul 2019, 7:43 PM
Aditi
Aditi - avatar