Write program to read a text file and to count the number


Write program to read a text file and to count the number of lines and characters in the file (do not include the new line characters in the character count). data.txt

Mary had a little lamb little lamb little lamb. Mary had a little lamb. So what?

Sample Input/output

Enter file name: data.txt

Number of lines in data.txt is 3

Number of character in data.txt is 78

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write program to read a text file and to count the number
Reference No:- TGS02850702

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)