I am creating a very simple program, asking the user to guess words. Guessing words works just with Scanner
and System.out.println()
, so its very simple and no user interface is needed.
The guessing of words is done with eclipse. Now I need to add a function, which will allow the user to exit the "program" anytime by clicking CTRL+z and when they do that I'll need also to print out possible words they could've have guessed.
But I do not know how to add the CTRL+z exit function. Can anyone suggest anything on how to ? The word guessing is a loop.