WHAT IS THE PURPOSE OF SYNCHRONIZED BLOCK?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
Java 
 571  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    What is the purpose of Synchronized block?

    • Synchronized block is used to lock an object for any shared resource.
    • Scope of synchronized block is smaller than the method.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!