title: Java loop gets stuck and doesnt exit
body: <p>So im creating a game of blackjack as part of an assignment for my college. I have to create some kind of method to allow the player to Hit or Fold.I decided to write this part of code which checks the input:</p>
  <pre><code>do {
      System.out.println(playernames[j]+&quot; (H/F)&quot;);
      playerinput=input.next();
  } while (!((playerinput.equals(&quot;H&quot;))||(playerinput.equals(&quot;F&quot;))));  
  </code></pre>
  <p>Everything runs smoothly until it reaches this loop.The workspace im working(eclipse) doesnt show any syntax problems nor any java exceptions occur.I tried editing this to find what is happening by using a temp boolean set to false before the loop and after the loop it gets set to true.The output didnt change meaning it didnt get past the loop.</p>