Question: Answer in Java please Write a program that prompts the user to enter a file name (use a FileChooser) The program outputs to the screen

Answer in Java please
 Answer in Java please Write a program that prompts the user

Write a program that prompts the user to enter a file name (use a FileChooser) The program outputs to the screen the number of lines, words and characters in the file (that you collected with the FileChooser) to an output file hard-coded) called FileStats.txt AND to the screen. Also prompt the user to enter a string to Search for in the file. In your output, state how many lines contained the requested string and display the lines and their line number. As with all assignments, do this one piece at a time. Test often and don't try to do it all at once. Try having the output go only to the screen first, and when that's working send it to the output file (FileStats.bet) as well. Enter input file name: text1.txt Enter a string to search for: and 33 lines 159 words 810 characters Your requested word - and was found 8 times. 6: And what to do and how to be 10; But there in the sandpile at Sunday school 21: Wash your hands before you eat 23: Warm cookies and cold milk are good for you. 25: Learn some and think some 26: And draw and paint and sing and dance 27: And play and work every day some. 31: Hold hands and stick together ***It's ok if your numbers are off slightly, but they shouldn't be off by more than a couple. *** ***Note: text1.ext can be copied (drag and drop) out of the Eclipse import and put somewhere else on your hard drive for testing." Please do your best to keep it simple, I'm just trying to learn what to do not to get a super complex code. If you could also put in a comment or two within the code that would be greatly appreciated. Thank you

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!