Java synchronized modifier
1." synchronized" is a modifier applicable for methods and blocks but not for classes and variables.
2.If multiple threads are trying to operate simultaneously on the same java object then, there may be a chance of data inconsistency problem.This is called "Race Condition".We can overcome this problem by using synchronized keyword or modifier.