Question: Use simple Java Language with Scanner file reader. Don't use advance java. Write a program named 'WordCounter.java that asks the user for the name of

Use simple Java Language with Scanner file reader. Don't use advance java.
Write a program named 'WordCounter.java that asks the user for the name of a file (i.e. full file name path should be entered). The program should display the number of words that the file contains. The WordCounter program should be in a loop asking Y/N for more file names until the user exits with a 'N'. NOTE: We will assume that the files always exist. There is no need to catch error exceptions (e.g. FileNotFoundException) because we haven't discussed this topic in class yet. Below a sample run of this application WordCounter: Enter the name of a file: c:\workspace\23Stuff.txt That file has 23 words in it. Do you want to count words in another file? y Enter the name of a file: c:\workspace2Stuff.txt That file has 2 words in it. Do you want to count words in another file? n bye... The file 23Stuff.txt has the following content: This line has seven words in it. This line is longer. It has ten words in it. Two words. One. Three words here. The file 2Stuff.txt has the following content: Hello there
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
