E
E
Ernest Farukshin2019-04-14 20:42:53
Java
Ernest Farukshin, 2019-04-14 20:42:53

Is it possible to stop Scanner waiting?

Hello. I am writing a quiz where you need to type the correct answer in a certain time (via the console). Stopped the main thread for 3 seconds and in another thread requested input from the console. After 3 seconds, although it displays that the answer is correct, the program does not end but waits for input. Can you tell me how to stop waiting for input from the user?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question