title: Get first value in an array list before comma
body: <p>My program is reading from an external file and putting each line of data into an array list. There are 5 different values on a line in the external file and the values are separated by commas. I just can't figure out how to get that first value in the array list to use in other parts of my code. 
  The first value in the file is the name and that is what I am trying to get to match it with the entry they make for changeName.</p>
  
  <pre><code>System.out.println("Enter the name of the player you would like to change the amount for");
      String changeName = FileUtility.getInput().nextLine();
  
      Scanner s = new Scanner(new File(FILE_NAME));
      String str = "";
      ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
  
      while (s.hasNext()) {
          list.add(s.next());
      }
  </code></pre>