|
|
|
|||
|
Running the countChars MethodThe followingmain method for the Count class
opens a Reader on a file named on the command line
and then calls countChars with that Reader.
You can use this application to run countChars.
The output of this program
depends on what's in the file named on the command line.
These platform-specific instructions
show you how to run the application on a file named testing
that contains the following ASCII text and displays the results:
Now that you've seen theIch bin ein Berliner. I am a jelly doughnut. countChars method in action,
the remainder of this lesson looks at the various components
that make up the method and how they fit into the Java language.
| |||
|