I\'m trying to test 2 threads, one with high, and the other with low priority.
According to my results sometimes the low priority thread is faster, how is this possible?
Thread priorities are not guaranteed to have any effect; this is mentioned in multiple places, including JDK javadocs. So assuming that on platform you are running on basically ignores levels, then it goes back to basic stastical probabilities: sometimes some threads seem to run faster than others, depending on how scheduler works and so on.
I don't think anyone really uses Java thread priorities for everything, given that their working (or lack thereof) is at best platform-dependent.