LightMetrics interview question

where to use synchronized keyword in java and why?