title: In Java how can I figure out how many of a certain letter appears in a string with recursion?
body: <p>So I need to use recursive programming to figure out how many times a certain letter appears in a word. For example, the word "complete" would have 2 e's. I kind of know what I need to do but I am just not sure how to do it. I currently have a scanner set up to take the word from the user, but that is all I have coded at the moment. I feel like the pseudocode should be something like;</p>
  
  <p>Take word from user </p>
  
  <p>if (letter &lt;= 0)</p>
  
  <p>return 1;</p>
  
  <p>else
   return length of characters in word</p>
  
  <p>I am guessing that I use the length or charAt method somehow?
  I really need some guidance here, like how does the recursion come in? Is that because it breaks down the word until it finds the amount of "e's" remaining? Would the base case be 0?I really appreciate the help! I am really new to this. Thank you very much.</p>