i'm very new to java coding. i have a thread.sleep () to pause the execution and would like to write a code to resume execution with a key press on console. here is my code:
int pausetime = 9000; //user input
if (pausetime!=0){
thread.sleep(pausetime)}
for example user enters 9000 and decides to resume the execution at 5 secs, code should resume the execution with any key press on the console.