Q. What is the purpose of the ‘synchronized’ keyword?
Solution:
Synchronized ensures thread safety by allowing only one thread to execute the block or method at a time.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
Synchronized ensures thread safety by allowing only one thread to execute the block or method at a time.
Strengthen Your Practice with our comprehensive question bank.