Question: Write a program, NumeralCount, that receives a path to a text file as args[ 0 ] and computes for the numerals 0, .., 9 how
Write a program, NumeralCount, that receives a path to a text file as args[ 0 ] and computes for the numerals 0, .., 9 how many times they appear in the file. String. Use an int array of 10 elements in generating the counts.
The following is an example of the execution of such a program. Suppose the file foo.txt has the following contents:
dwfd08345yhkfjbg42549wrgse8y240j
3438vds0
33333087847219p85740725y8hbfwow78f\
Then the program behaves as follows:
% java NumeralCount foo.txt
0: 5
1: 1
2: 4
3: 8
4: 7
5: 4
6: 0
7: 5
8: 8
9: 2
%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
