NeoXam interview question

How to implement synchronization in Java?