Question: in java, Ask the user for the name of a file and a word. Using the FileStats class, show how many lines the file has

in java, Ask the user for the name of a file and a word. Using the FileStats class, show how many lines the file has and how many lines contain the text.

these are the files

bill-of-rights.txt

2.86 KB

dictionary.txt

213.19 KB

romeo-and-juliet.txt

143.58 KB

Test Case 1

Enter a filename romeo-and-juliet.txt (enter) romeo-and-juliet.txt has 5268 lines Enter some text the (enter) 1137 line(s) contain "the"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!