What is one positive and negative aspect of using the synchronized keyword to prevent concurrent access issues?

What is one positive and negative aspect of using the synchronized keyword to prevent concurrent access issues?



Answer: By using the synchronized keyword, it will technically fix the issue in a single word, making it the most simple solution, but by blocking the second thread from accessing the method until the first exits might cause performance degradation


Learn More :

Multithreading and Concurrent Processing

Learn More Multiple Choice Question :