• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread.sleep(milisec)

 
kalps ganvir
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know that sleep method coz current thread to suspend its execution
for milisec ok!! but my question is about the exception thrown by this method is InterrupedException when will this excetion is thrown by
sleep()?

 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15354
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
InterruptedException is thrown from Thread.sleep() when another thread calls interrupt() on the sleeping thread.
 
kalps ganvir
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thnks but not satisfied
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic