How to handle user input

Even though it used Java 8, we couldn’t use lambda syntax at all!