• Post Reply Bookmark Topic Watch Topic
  • New Topic

pause a progam  RSS feed

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all ,when i want to pause a thread i use the sleep
method , is there a way to pause the program and not the
a thread , like pausing the main method !?
thx
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have look at wait()/notify()/notifyAll() methods in java.lang.Object

pascal
 
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use

Thread.sleep(3000);

which will pause the program.
 
omar bili
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankx for the Help .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!