Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of these is NOT a constant of Thread.State?

  • A.TERMINATED
  • B.SLEEPING
  • C.RUNNABLE
  • D.BLOCKED

Answer: B

There is no SLEEPING state. A sleeping thread is reported as TIMED_WAITING, the same state as one in wait with a timeout or join with a timeout. The enum names describe why a thread is not running rather than which method put it there.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.