What does `Thread.sleep(1000)` do?

Java Professional Easy

Java Professional — Easy

What does `Thread.sleep(1000)` do?

Key points

  • `Thread.sleep(1000)` pauses the current thread, not terminate it.
  • It does not release locks held by the thread.
  • It does not switch context to another thread.

Ready to go further?

Related questions