What is the purpose of the `notify()` method in interthread communication?
`notify()` is used to notify a thread that it can proceed, but only if the thread was previously paused by a `sleep()` method.
Thatâ€™s incorrect. `notify()` works with threads that are waiting due to a `wait()` call, not `sleep()`.
Can you explain how `wait()` and `sleep()` differ in terms of thread behavior?