How can I clear the buffer so this works?
<p>It works in the IF statement, but in the ELSE statement, I have to type 4 responses before it prints out. Any ideas? I know I need to clear the buffer somehow I think.</p>

<pre><code>System.out.println("Would you like to play a game? (Y/N)");
        if(scanInput.next().equalsIgnoreCase("y")||scanInput.next().equalsIgnoreCase("Y")) {

        System.out.println("let's play");
    }

    else if (scanInput.next().equalsIgnoreCase("n") || scanInput.next().equalsIgnoreCase("N")){

        System.out.println("Goodbye");
    }
</code></pre>
