Using System.console().readLine() instead of Scanner.