Use System.in.read() repeatedly
<p>New to programming, and I'm trying to create a "Guess the letter" game. The idea is that the first person presses a key, then the second person presses a key to see if she has guessed it right.</p>

<p>Here is my code:</p>

<pre><code>package bookExamples;

public class GuessTheLetterGame {

    public static void main(String[] args) throws java.io.IOException{
            char answer;
            System.out.print("press a key and press ENTER:");
            answer= (char) System.in.read();
            char guess;
            System.out.print("Have a guess and press ENTER: ");
            guess = (char) System.in.read();
            if (guess == answer)
                    System.out.println("**Right**");

    }

}
</code></pre>

<p>It runs okay until the line "Have a guess and press ENTER:", then I tried to press a key again, the code has no reaction.</p>

<p>Thank you in advance :)</p>