Sr.Java Web Developer Question:
Download Questions PDF

Do you know what is synchronization?

Sr.Java Web Developer Interview Question
Sr.Java Web Developer Interview Question

Answer:

Synchronization refers to multi-threading. A synchronized block of code can be executed by only one thread at a time. As Java supports execution of multiple threads, two or more threads may access the same fields or objects. Synchronization is a process which keeps all concurrent threads in execution to be in sync. Synchronization avoids memory consistency 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 the thread is blocked until that thread releases the monitor.

Download Sr.Java Web Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Please explain why should we not configure JSP standard tags in web.xml?Explain me what do you generally do after you have resolved a problem?