Using .equals() with Scanner object
<p>For some reason I am getting different results from an input of lower case "y" than an input of upper case "Y". An input of "y" executes the code in the if statement but an input of "Y" does not.  Also, an input of "Y" does not execute the break; after else.  Why is this and what am I doing wrong?  </p>

<pre><code>Scanner playAgain = new Scanner (System.in);


System.out.println ("Play Again (Y/N)");

if ((playAgain.next().equals("y"))||(playAgain.next().equals("Y")))
{
Game theGame1 = new Game(0);
currentPts = currentPts + theGame1.play(total);

System.out.println("Current total is:" + "   "  +  currentPts);
}
else break;
</code></pre>
