by jesse

What is the easiest way to pause execution of a program in java, without threads?

well, the title lies, it does actualy use threads, but the class does not have to extend java.lang.thread, or anything else. so here it is: Thread.currentThread().sleep(int); and now, a brief explanation, Thread.currentThread() returns an instance of the caller, as a thread, even when the caller isnt a thread, its a bagel, or an applet. you could just as easily use stop, or pause instead of sleep also.

 


 
Read more of   The Yak's Frequently Questioned Answers   (mod.2010-02-10)

443.   Who is Tila Tequila?   [n0b0dy/2008-06-12]
437.   How do I wash a feather comforter?   [n0b0dy/2006-08-13]
432.   Who are the Steve Police?   [jake/2006-05-21]
345.   Is dumpster diving against the law in the United States?   [jake/2003-01-30] ( lodri/2003-03-06 )
340.   what can i use to debug my mail server when pop3 or imap isnt working?   [jesse/2002-12-09]
337.   you ever watch Jem and the Holograms?   [virgil/2002-11-24]
307.   Where the hell is #yak?   [vonguard/2002-02-07]
293.   where can i find data about the most common names in the USA?   [jesse/2001-12-05]
248.   what font does jesse use for coding?   [jesse/2001-06-09] ( robey/2001-06-26 )
90.   What happened to Jesse and TreesN at sf2600 may2000?   [strick/2000-05-06]
63.   What does the accronym ENIAC stand for?   [simon/2000-02-19]
43.   How much coffee/Mountain Dew can you drink before dying?   [robey/2002-12-06]