I have a file in the project in netbeans called "input.txt" which has a list of names like the following:
John Doe
Magnus Carlsen
Mikhail Tal
Bobby Fischer
I created an arraylist with:
ArrayList <String> names = new ArrayList<String>();
I want to add in the arraylist names. I want the value at [0] to be "John Doe" and the value at [1] to be "Magnus Carlsen" and so on. How can I do this?