For second question, most modern JVMs pass the threading to the underlying OS libraries. So it is the OS libraries that choose the waiting thread. As for the Java Specification, it doesn't require any order or preference.
First of all ,you should know that objects don't wait for threads, Its opposite. Threads actually wait for an notification so that they can continue their operation. One thread can own multiple locks but one object lock can only be owned by one thread.
Let me put it this way, following is an example where a machine is waiting for a for a job to work on. Here job is a object and as soon as a new job is build, machine will get notification to continue to work on that job.
Though all of you may agree that, this code is not foolproof, for example notify can happen even before wait starts. This is just to help Shadab understand how threads owns lock on an object and gets notified to reclaim their property .