Praveen, I do not know the answer to your question.
Here are 3 things I have learned by experimenting with variations of your example.
1. If *two* new threads are waiting, when the main thread calls notify and wait, all 3 threads wake up.
Thread t2 = new Thread(t1); // second thread call run on same object
t2.start();
2. If the main thread calls notify, then *releases* the lock, then *acquires* the lock again, then calls wait, only the new thread wakes up.
synchronized(this) { notify(); }
synchronized(this) { wait(); }
3. If the threads are waiting on some object other than the Thread object, only the new thread wakes up.
Object lock = new Object();
In startMe(), synchronized(lock) { lock.notify(); ... lock.wait() }
In run(), synchronized(lock) { lock.wait(); }
4. I looked in the Sun
Java bug database. So far, I have not found anything.