Question: Write a program that will count the number of characters, words, and lines in a file. Words are separated by whitespace characters. The file name
Write a program that will count the number of characters, words, and lines in a file. Words are separated by whitespace characters. The file name should be passed as a command-line argument, as shown in Figure 12.13.

Command Prompt O X c:\exercise>java Exercise12_13 Welcome.java File Welcome.java has 170 characters 22 words 6 lines c:\exercise>
Step by Step Solution
3.41 Rating (167 Votes )
There are 3 Steps involved in it
import javaio import javautil public class Exercise1213 public static void mainString args throws Ex... View full answer
Get step-by-step solutions from verified subject matter experts
