Let\'s say I have a thread T and it is holding one resource R. If I call Thread.sleep() on the current thread i.e T, will it release the resource R (to let other threads use
The thread which is going to sleep will hold the lock(not release resource) while it sleeps. A sleeping thread will not even be scheduled for the time it sleeps (or until it is interrrupted and then it wakes up)