sleep() | wait() |
It is defined in the ' Thread ' class. | It is defined in the 'Object' class. |
It does not release the lock or hold its monitor. | It releases the lock or hold its monitor. |
It is an instance of ' java.lang.Thread ' class. | It is an instance of ' java.lang.Object ' class. |
In this method, it goes into 'TIMED_WAITING' state without releasing the lock. | In this method, after releasing the lock, it goes into 'WAITING' state. |
It is a static method. | It is a non-static method. |
It is called within or outside the synchronized block. | It is called within the synchronized block. |