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.
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<String> list = new ArrayList<String>();
while (s.hasNext()) {
list.add(s.next());
}