A

Admin • 828.03K Points
Coach

Q. What will happen if a thread is sleeping and gets interrupted?

  • (A) It will ignore the interruption
  • (B) It will throw InterruptedException
  • (C) It will terminate silently
  • (D) It will restart

Explanation by: Admin
Thread.sleep() throws InterruptedException if the thread is interrupted while sleeping.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.