ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

What is synchronization and why is it important?

Java supports multiple threads to be executed. This may cause two or more threads to access the same fields or objects. Synchronization is a process which keeps all concurrent threads in execution to be in synch. Synchronization avoids memory consistence errors caused due to inconsistent view of shared memory. When a method is declared as synchronized; the thread holds the monitor for that method's object. If another thread is executing the synchronized method, your thread is blocked until that thread releases the monitor.

 

Related Posts Plugin for WordPress, Blogger...
Flag Counter