title: Why is my hasNextLine() while loop only working one time?
body: <p>I have been working on this for hours and can't find the problem by myself or online. I dont know why the first loop does work and the second does not proceed past the first itteration.</p>
  
  <pre><code>File adjacencies = new File(adjacenciesFile);
  Scanner adjacenciesScanner = new Scanner(adjacencies);
  //idk why this works and the while loop after doesn't 
  /*
  while(adjacenciesScanner.hasNextLine()){
          System.out.println(adjacenciesScanner.nextLine());
      }
  */
  
  while(adjacenciesScanner.hasNextLine()){
      ArrayList&lt;Country&gt; adjacentCountries = new ArrayList&lt;Country&gt;();
      String[] adjacenciesNames = adjacenciesScanner.nextLine().split(",");
  
      for(String countryName : adjacenciesNames){
          adjacentCountries.add(this.countries.get(countryName));
      }
      System.out.println(adjacentCountries);
      adjacentCountries.remove(0);
      this.countries.get(adjacenciesNames[0]).addAdjacencies(adjacentCountries);
  }
  </code></pre>
  
  <p>This is the file that I am reading in:</p>
  
  <pre><code>Alaska,Alberta,Northwest Territory,Kamchatka
  Alberta,Alaska,Northwest Territory,Ontario,Western United States
  Central America,Western United States,Venezuela
  Eastern United States,Western United States,Ontario,Quebec
  Greenland,Northwest Territory,Ontario,Quebec,Iceland
  Northwest Territory,Alaska,Greenland,Ontario,Alberta
  </code></pre>
  
  <p>There is no exception, it just doesn't run more than once</p>