[SOLVED] How do I read from a text file
I'm asking this question because I want to learn how to read and write from a text file.
Let's say I have a text file names.txt that has 1000 names listed 1 name in each row. It is saved in "C:/names.txt".
I have 3 scenarios:
1. I want to set each name into an array.
String theNames = new String
2. I want to take each name and add "Mr. " before it. Save the new names to the same text file.
3. Same as #2, except create a new text file (theNewNames.txt) and save the names there.
How would I do each of these?