C:\>java TextAnalyzer
Usage: java TextAnalyzer filelist
C:\>java TextAnalyzer xyzzy.txt cities.txt blahblahblah Cathedral.txt a
Error: Could not open file: xyzzy.txt
For file: cities.txt
Lines: 16047
Words: 137240
Chars: 759288
Top 10: E T A O N I H S R D
Error: Could not open file: blahblahblah
For file: Cathedral.txt
Lines: 1894
Words: 17723
Chars: 109741
Top 10: E T O A I N S R L H
Error: Could not open file: a
For all files:
Tot Lines: 17941
Tot Words: 154963
Tot Chars: 869029
Top 10: E T A O N I S H R D
Note: The above sample run shows the total number of characters if you are
using the file length for that calculation. If you are using the lengths
of the lines that you read in from the files, the character counts would
not include newline characters, so your counts for the characters would be:
- Chars: 105955 (Cathedral.txt)
- Chars: 743241 (cities.txt)
- Chars: 849196 (total)