1.

What Is The Difference Between Synchronized And Synchronized Block?

Answer»

In case of a SYNCHRONIZED METHOD a thread may need to have the lock for a longer TIME as compared to the synchronized block.

Another difference between synchronized method and block is that we don’t specify the particular OBJECT whose MONITOR is required to be obtained by thread for entering a synchronized method, whereas we can specify the particular object in case of synchronized block.

In case of a Synchronized method a thread may need to have the lock for a longer time as compared to the synchronized block.

Another difference between synchronized method and block is that we don’t specify the particular object whose monitor is required to be obtained by thread for entering a synchronized method, whereas we can specify the particular object in case of synchronized block.



Discussion

No Comment Found