i want to create a simple program in java that ask the user to enter a number (using Scanner) in a countdown, for example 10 sec, and if the user don't enter a number in that amount of time, then the thread will stop and it'll show any message
My problem is that i can't find a way to stop the thread when Scanner.nextInt() is running
Can anybody help me?