Tuesday, December 8, 2009

Go to sleep for a while in Java Program using Thread

// import the library
import java.lang.Thread;
try{
	// sleep for 1 second (1000 milliseconds)
	Thread.sleep(1 * 1000);
}
catch(InterruptedException e){
	e.printStackTrace();
}
finally{
}

0 comments: