Digital Marketing

Difference between sleep() and wait() in Java?

Java sleep () and wait ()

The major difference is that wait () releases the lock or monitor while sleep () doesn't releases the lock or monitor while waiting. wait () is used for inter-thread communication while sleep () is used to introduce pause on execution, generally.

Popular posts from this blog

How to fix Google Apps Script: Script function not found: doGet

Creating sort index in MySQL

How to fix: df shows no file systems processed on Linux