notify() method moves a thread out of the waiting pool to ready state, but there is no guaranty which thread will be moved out of the pool.
When a Thread calls the sleep() method, it will return to its waiting state. When a Thread calls the yield() method, it returns to the ready state.
Daemon is a low priority thread which runs in the backgrouund.
We should call setDaemon(true) method on the thread object to make a thread as daemon thread.