Synchronisation in Java

  • It is a process which keeps all concurrent threads in execution to be in sync while trying to access the same object at the same time.
  • It prevents memory consistency errors caused due to inconsistent view of shared memory.
  • Ex BookMyShow, multiple users try to book tickets at same time but ticket selected by one user is Locked and prevented for other users.

Leave a Reply