In generic terms when you call sleep(1000) this means that the
thread on which you are executing it will sleep down for 1000 milleseconds, go to sleep state and then go to Ready to Run state after the defined time in the constructor and when you will called yield methord then the thread will immediately go to Ready to Run state and wait for it chance to be get executed.
In Nutshell -:
***sleep(1000) -: immediately get the current running thread blocked and go to Ready to Run state after the defined time in the constructor and wait for its cance to be get executed.
***yield -: immediately take the thread on which it is called to Ready to Run state and wait for it chance to be executed , it does not get Blocked.