Write a program that calls on a file and outputs the word count of the file.

Responsive Centered Red Button

Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.

Please write a program that calls on a file and outputs the word count of the file. The word doc attached has these directions. No java docs or special styles required. Program must compile, run and output format should match the example.
__________________
Assignment
Students are often asked to write term papers containing a certain number of words. Counting words in a long paper is a tedious task, but the computer can help. Write a program that counts the number of words, lines, and total characters (not including whitespace) in a paper, assuming that consecutive words are separated either by spaces or end-of-line characters. Prompt the user for an input filename and continue to reprompt if the file does not exist. Use try/catch (do not use the throws clause).Your program should be named WordCount.java.  For example,  using an input file containing the following lines::
Students are often asked to write term papers containing a certain number of words. Counting words
in a long paper is a tedious task, but the computer can help. Write a program that counts the number
of words, lines, and total characters (not including whitespace) in a paper, assuming that
consecutive words are separated either by spaces or end-of-line characters. Your program should be
named WordCount.java.
should result in the following output:
Total lines = 5
Total words = 66
Total chars = 346

How to create Testimonial Carousel using Bootstrap5

Clients' Reviews about Our Services