This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread.sleep(milisec)  RSS feed

 
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
Sheriff
Posts: 15985
86
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
Boost this thread!