thread.wait();
I got this from K&B method , every object has list of
thread waiting for lock for that object and one thread has lock . now suppose this thread calling wait() method , then it will go inside the list & wait for lock .
Is everything is right till this point ???
Now my doubts are :
1] suppose there are other threads present in that list , so will anyone get the lock() just after releasing lock or is there any method required for that ( may be notify() method ) ???
2] We are just creating a thread object & calling wait() method , so in this case there is no object , no lock , no waiting list .. so where this thread will go after calling wait() method ???
please help me ..
I am really confuse a lot ..
thanks a lot .