5 Counting Characters Words Lines Name Countingjava Write Program Gets Name Text File User Q37105536

Counting Characters, Words, and Lines

5. Counting Characters, Words, and Lines Name: Counting.java Write a program that gets the name of a text file from the user

5. Counting Characters, Words, and Lines Name: Counting.java Write a program that gets the name of a text file from the user and displays the count for the number of non-whitespace characters (i.e., not spaces, tabs, or newlines), words, and lines in the file. Assume words are separated by spaces. Sample Run: Enter file name: file.txt Characters: 19 Words: 5 Lines: 3 Where file.txt contains: hello how are you? rawr Show

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.