Pergunta de entrevista da empresa LightMetrics

where to use synchronized keyword in java and why?