Staples interview question

Thread lock in Java