title: Java: Using a scanner.nextLine().equals("example")) needing repeated input
body: <p>I am using a Scanner to detect input from the user, the idea is that the user can type "help" or "test" into the terminal at any time to display an out put.</p>
  
  <p>So far my code works because I have to hit enter twice to see an output when I type. This what I have so far:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Game
  {
      static Scanner command = new Scanner(System.in);
  
      public static void main(String[] args)
      {
          GAME:
          while (var.running == true)
          {
              check.controls();
              command.nextLine();
          }
      }
  }
  
  public class check extends Game
  {
      public static void controls()
      {
          if (command.next().equals("help"))
          {
              System.out.println("This is the help Menu");
          }
  
          else if (command.next().equals("test"))
          {
              System.out.println("fail");
          }
      }
  }
  </code></pre>
  
  <p>My issue is that when typing "help" and then immediately typing "test" noting will register the first time.</p>