title: Input is Skipped
body: <p>So I'm writing a program and part of it requires the user to input 5 track events, 4 team names, 6 athletes for each team, and what place every athlete got in each of the 5 events. In my code now, the program runs fine until the user has to input the second athlete name, and seems to skip the user input. </p>
  
  <p>I have a feeling that there is a dangling white space somewhere and I tried placing input.next() in several places but it didn't fix the problem. Here is my code and a pic of the input error.</p>
  
  <pre><code>    System.out.println("Please enter the 5 events in this competition.");
      for(int i = 0; i &lt; events.length; i++)
      {
          events[i] = input.nextLine();
      }
  
      for(int i = 0; i &lt; teams.length; i++)
      {
          System.out.println("Please enter the name of team " + (i + 1));
          teams[i] = input.nextLine();
          for(int k = 0; k &lt; athletes[i].length; k++)
          {
              System.out.println("Please enter the name of athlete " + (k + 1));
              athletes[i][k] = input.nextLine();
              for(int j = 0; j &lt; places[i][k].length; j++)
              {
                  System.out.println("What did " + athletes[i][k] + " place in " + events[j] + " ?");
                  places[i][k][j] = input.nextInt();
              }
          }
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/IQ9lD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IQ9lD.png" alt="enter image description here"></a></p>