I know every Java object can be locked. With wait, I can release the lock for another thread. I want to know does notify/notifyAll release the lock it is holding for another thread?
No, with notify/notifyAll you can’t release the locks. Notify releases its lock, when the awakened thread can run the code.
Interested in Java? Check out this Java tutorial by Intellipaat.