I was wondering...
If you have a reference to a thread, you can tell that thread to sleep. Is it possible to make the thread that's running your main method sleep?
i.e., if I wrote HelloWorld.java with only a main method that contained a continuous loop that printed "Hello World" over and over again, is there a way to tell main to sleep so that it would wait a few seconds before printing the next "Hello World"?
Brad Gunsalus
bardley90@hotmail.com
If you have a reference to a thread, you can tell that thread to sleep. Is it possible to make the thread that's running your main method sleep?
i.e., if I wrote HelloWorld.java with only a main method that contained a continuous loop that printed "Hello World" over and over again, is there a way to tell main to sleep so that it would wait a few seconds before printing the next "Hello World"?
Brad Gunsalus
bardley90@hotmail.com