+ 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
2 ответов
+ 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 .
+ 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.