If multiple threads are waiting on an object’s monitor, JVM
awakens one of them. As per Java specification the choice of this
thread is arbitrary and it is at the discretion of the implementation.
So there is no guarantee of rule that a specific thread will be
awakened by JVM on notify() method call.
https://www.oreilly.com/library/view/java-threads-second/1565924185/ch04s03.html