Does the position of the notify() call matter?(Java)
===

Suppose I have the following situation:

    synchronized void someMethod()
    {
    //..
    
    ..//
    try {
       wait();
    }catch(InterruptedException e) {
       System.out.println("InterruptedException caught");
    } 
    //..

    ..//
    }

and

    synchronized void someOtherMethod()
    {
    //..
    
    ..//
    notify();  
    }

And the `Thread` accesses first `someMethod`, goes into `wait` and then `someOtherMethod` notifies it and returns to `Runnable` state. Does the position of the `notify()` call in the method matter? I noticed no change in behavior even when I positioned the `notify()` call at different positions inside the method. 

Shouldn't the `Thread` be notified immediately when the call to `notify()` is made?

