Informatica interview question

How is synchronized key word used in Java?