title: Write a recursive method that returns the number of occurences of 'A' in the string it is passed
body: <p>So I've been fiddling with this problem for the past hour. I keep getting unexpected type error. It appears to be from a confliction between charAt and s.length. Any ideas on what could fix that?</p>
  
  <pre><code>class lab7
  {
      public static void main(String[] args)
      {
          String s = ("BCA");
      }
  
      public static String recursion(String s)
      {
          if (s.length()&gt;=0)
          {
              if(s.charAt(s.length()) = A)
              {
                  count++;
              }
              s.substring(0, s.length()-1);
          }
          return count;
      }
  }
  </code></pre>