While loop issue in Java
<p>This is a little bit of my code.</p>

<pre><code>System.out.print("Would you like to continue (Y/N)?");
while (!Anwser.equals("Y")){
    Anwser = UserInput.next();
    System.out.println("Would you like to continue (Y/N)?");
}
</code></pre>

<p>This is the answer.</p>

<pre><code>&gt; Would you like to continue (Y/N)? 
&gt; Would you like to continue (Y/N)?
</code></pre>

<p>Why does it print it out again although i wrote Y and the conditiomns were not met? After this it continues with the code:</p>
