setPriority() MIN and MAX
Regarding the code attached to this question, no matter what is set for the setPriority() parameter, the first declared thread object (name.start()) will run like 4 out of 5 times prior to the second thread object with the higher priority! My question is, is it because there is no control over the threads overall? Is it because of the platform that I am trying to run this code on and the resource sharing architecture of it? or am I doing somethnig wrong here? https://code.sololearn.com/cfYeFhZweKLD/?ref=app PS: Revieweed Minho's kind answer to this question, checked out the getPriority() and set it for each thread in their class, the performance of the code is much better now! However, I still get random mixed up outputs after running the code mutple times in a row but it's much better now. Still need to do more study on the topic! Thank you Minho!