In your InputHandler class you are using

System.console().readLine().trim();
to get the input but if you are using any IDE like eclipse then this code is not going to work.

It's better if...