How do I get a FileReader to read a file using the filename as input, rather than putting a direct filepath to the file? So instead of something like
FileReader fr = new FileReader("C:file");
We have something where when we call FileReader(filename), we put the filename in as a parameter. So if I put in the command prompt:
Java FileReader input.txt
It will read the text file without me having to have put in new FileReader("C:input.txt").