title: Why is the prompt in my for loop printing twice the first time?
body: <p>The first print statement in my for loop is printed twice before moving on to the next line. But then it runs through the loop like it should after that? </p>
  
  <p>I tried using my debugger, but I've never used it before, we haven't gone over using it in any of my classes and I wasn't too sure what I was doing</p>
  
  <pre><code>public static void main(String[] args) 
  {
      int numElements;
  
      Scanner keyboard = new Scanner(System.in);
  
      System.out.println("How many people are you adding: ");
      numElements = keyboard.nextInt();
      ArrayBndQueue queue = new ArrayBndQueue&lt;&gt;(numElements + 1);
  
      for(int index =0; index &lt;= numElements; index++)
      {
          System.out.println("Enter a gender and name (ex: f jenny)");
          String name = keyboard.nextLine();
          System.out.println(name);
          queue.enqueue(name);
  
      }
  
  }  
  </code></pre>