What is interthread communication in Java?
Interthread communication involves threads communicating using shared variables or using `synchronized` blocks to ensure data consistency.
Thatâ€™s partially correct. While synchronization plays a role, interthread communication specifically refers to threads waiting for signals from each other.
Can you elaborate on how `wait()` and `notify()` are used for interthread communication?