How would I write the function with the following specification?
<pre><code>/**Yields: number of times the characters in s1 appear in s2.*/
 public static int noOfTimes (String s1, String s2) {

 }
</code></pre>

<p>I understand that the body of this function should contain a for-loop which repeatedly calls this function that I wrote below.  How should I proceed?</p>

<pre><code>public static int noOfTimes (char c, String s) {

  if (s.length() ==0) {
    return 0;
  }
  return (s.charAt(0) == c ? 1 : 0) + noOfTimes(c, s.substring(1));
}
</code></pre>
