Java - wait?

Code:
long millis = 10000;  //10 seconds
try{
	Thread.sleep(millis);
} catch (InterruptedException ex){
	// Handle Exception
}

Edit: thanks Phil99
 
Last edited:
I may be wrong here, but wouldn't you have to name the exception, e.g:

Code:
long millis = 10000;  //10 seconds
try{
	Thread.sleep(millis);
} catch (InterruptedException IE){
	// Handle Exception
}
 
Back
Top Bottom