I'm starting to read Java and I'm in multithreading topic. Also I'm a C programmer, so I've knowledge on threading for C language.
I was searching for how threads are communicating with each other on specific object.
I found this question Java: How can the wait() and notify() methods be called on Objects that are not threads? but I've conflict.
What I know that synchronized
keyword applies the concept of locking mechanism. So if I synchronized of an object and then called wait
on this object does it mean that the lock will be freed for another thread to access? As the example in the previous link