Domanda di colloquio di Intellect Design Arena

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