srananmeitie
11-14-2003, 12:05 AM
Hi,
I am writing a Concordance program that will read from a file (the file name is not known), and print each word with the number of times it occurs and the line number(s).
My problem is with reading the file as input. I know how to read a file when the filename is known, and using keyboard input, but how do I proceed if the filename is not known? (The file is a text file)
I also am a bit confused with FileInputReader and InputStreamReader.
Can someone help me please?
Thanks!
I am writing a Concordance program that will read from a file (the file name is not known), and print each word with the number of times it occurs and the line number(s).
My problem is with reading the file as input. I know how to read a file when the filename is known, and using keyboard input, but how do I proceed if the filename is not known? (The file is a text file)
I also am a bit confused with FileInputReader and InputStreamReader.
Can someone help me please?
Thanks!