We use the synchronized block because:
It helps lock an object for every shared resource.
The scope of the synchronized block is smaller than the method.