What is the effect of Thread.sleep(5000) inside a thread?

Last Updated :
Discuss
Comments

What is the effect of Thread.sleep(5000) inside a thread?

The thread is terminated

The thread is paused for 5 seconds but remains in the RUNNABLE state

The thread is paused for 5 seconds and enters the TIMED_WAITING state

The thread releases its lock and resumes immediately

Share your thoughts in the comments