What is the difference between methods sleep() and wait()? (Senior Lecturer – Amplify Mindware)
Transcript: Both method is use in threads and this are use to convert the thread into a non runnable state. The difference between sleep and wait is whenever I make a thread to sleep whichever lock it have acquire it will still have the lock it dose not realize the lock or its also call as a monitor object but in wait method thread is going to realize all the locks has acquired because of this other thread will acquired so that’s make […]