DEV Community

Sivaram Rasathurai
Sivaram Rasathurai

Posted on

Answer: What's a monitor in Java?

In concurrent programming, we need to focus on two things

  1. Mutual exclusion

When a process/thread is executing its critical section no other processes are allowed to execute their critical section. (Each process has a code segment called "Critical section" in which shared data is accessed.)

  1. Synchronisation

When threads are trying…

Top comments (0)