read() != -1)
            count++;
        System.out.println("Input has " + count + " chars.");
    }
<strong>}</strong>
</pre>
</blockquote>

In the Java language, all methods and variables must exist within a class.
So, the first line of the character-counting application defines a class,
<code>Count</code>, that defines the methods, variables, and any other classes
needed to implement the character-counting application. Since this program
is such a simple one, the Count class just defines one method nam