class X{
Object obj = new Object();
synchronized methodA(){
obj.wait();
}
}
If I have a thread execute methodA(), does it release the lock on the object X as well or does it keep it and simply releases the lock on obj?
Object obj = new Object();
synchronized methodA(){
obj.wait();
}
}
If I have a thread execute methodA(), does it release the lock on the object X as well or does it keep it and simply releases the lock on obj?