Java Programming Help
<p>im a bit confused on this and i dont know how to solve this question that i have been asked, id be grateful if you could assist me on this question, maybe try to tell me what needs to be done, and how. the question is: </p>

<p>Write a method called countChars which takes an InputStream as a parameter, reads the stream and returns the number of characters it contains as an int. Any IOExceptions which might occur in the method should be passed back to the method's caller. </p>

<p>Note that the method header should show that it is possible that an exception might occur.</p>

<p>i attempted this question with the following code:</p>

<pre><code>public class countChars

{


public int countChars(int InputStream)
{
  return InputStream;

}


}
</code></pre>

<p>and i get an error message saying :</p>

<pre><code>Main.java:26: cannot find symbol
symbol  : method countChars(java.io.InputStream)
location: class Main
        s1 = "" + countChars(f1);
                  ^
1 error
</code></pre>
