What are synchronized methods and synchronized statements

Synchronized methods are methods that are used to control access to an object. A threadonly executes a synchronized method after it has acquired the lock for the method'sobject or class. Synchronized statements are similar to synchronized methods. Asynchronized statement can only be executed after a thread has acquired the lock for theobject or class referenced in the synchronized statement.

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions