If there are multiple threads with same priority waiting for execution, the result can’t be predicted because it completely depends on thread scheduler to decide which thread should be executed first.It depends on the algorithm followed by thread scheduler.