Intellect Design Arena interview question

Why is wake() and sleep() method used in java?