A simple use of scanner input for beginners with Java